Skip to content

Commit

Permalink
Move the parse_url() caution up to description section (GH-3834)
Browse files Browse the repository at this point in the history
This information is apparently not widely known, so we put it in a
more prominent place.
  • Loading branch information
cmb69 authored Oct 5, 2024
1 parent 63fc290 commit 72605fc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions reference/url/functions/parse-url.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
URLs are also accepted, <function>parse_url</function> tries its best to
parse them correctly.
</para>
<caution>
<para>
This function may not give correct results for relative or invalid URLs,
and the results may not even match common behavior of HTTP clients.
If URLs from untrusted input need to be parsed, extra validation is
required, e.g. by using <function>filter_var</function> with the
<constant>FILTER_VALIDATE_URL</constant> filter.
</para>
</caution>
</refsect1>

<refsect1 role="parameters">
Expand Down Expand Up @@ -252,15 +261,6 @@ array(3) {

<refsect1 role="notes">
&reftitle.notes;
<caution>
<para>
This function may not give correct results for relative or invalid URLs,
and the results may not even match common behavior of HTTP clients.
If URLs from untrusted input need to be parsed, extra validation is
required, e.g. by using <function>filter_var</function> with the
<constant>FILTER_VALIDATE_URL</constant> filter.
</para>
</caution>
<note>
<para>
This function is intended specifically for the purpose of parsing URLs
Expand Down

0 comments on commit 72605fc

Please sign in to comment.