[DOC-CVS] [doc-en] master: filter: fix XML to remove useless wrapping para tags via automatic script
[email protected] (Gina Peter Banyard)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Gina Peter Banyard (Girgias) Date: 2026-01-16T06:59:27Z Commit: https://github.com/php/doc-en/commit/627f933cfe6a033dccac32982cd68e7c1b86927f Raw diff: https://github.com/php/doc-en/commit/627f933cfe6a033dccac32982cd68e7c1b86927f.diff filter: fix XML to remove useless wrapping para tags via automatic script Changed paths: M reference/filter/examples.xml M reference/filter/functions/filter-has-var.xml M reference/filter/functions/filter-id.xml M reference/filter/functions/filter-input.xml M reference/filter/functions/filter-list.xml M reference/filter/functions/filter-var-array.xml Diff: diff --git a/reference/filter/examples.xml b/reference/filter/examples.xml index 9023dcad2b79..cad475c76de5 100644 --- a/reference/filter/examples.xml +++ b/reference/filter/examples.xml @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> - -<chapter xml:id="filter.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> +<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="filter.examples"> &reftitle.examples; <section xml:id="filter.examples.validation"> <title>Validation</title> - <para> - <example> - <title>Validating email addresses with <function>filter_var</function></title> - <programlisting role="php" xml:id="filter.examples.validation.email"> + <example> + <title>Validating email addresses with <function>filter_var</function></title> + <programlisting role="php" xml:id="filter.examples.validation.email"> <![CDATA[ <?php $email_a = '[email protected]'; @@ -25,21 +23,19 @@ if (filter_var($email_b, FILTER_VALIDATE_EMAIL)) { } ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ Email address '[email protected]' is considered valid. Email address 'bogus' is considered invalid. ]]> - </screen> - </example> - </para> + </screen> + </example> - <para> - <example> - <title>Validating IP addresses with <function>filter_var</function></title> - <programlisting role="php" xml:id="filter.examples.validation.ip"> + <example> + <title>Validating IP addresses with <function>filter_var</function></title> + <programlisting role="php" xml:id="filter.examples.validation.ip"> <![CDATA[ <?php $ip_a = '127.0.0.1'; @@ -53,20 +49,18 @@ if (filter_var($ip_b, FILTER_VALIDATE_IP)) { } ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ IP address '127.0.0.1' is considered valid. ]]> - </screen> - </example> - </para> + </screen> + </example> - <para> - <example> - <title>Passing options to <function>filter_var</function></title> - <programlisting role="php" xml:id="filter.examples.validation.options"> + <example> + <title>Passing options to <function>filter_var</function></title> + <programlisting role="php" xml:id="filter.examples.validation.options"> <![CDATA[ <?php $int_a = '1'; @@ -94,16 +88,15 @@ if (($int_c = filter_var($int_c, FILTER_VALIDATE_INT, $options)) !== FALSE) { } ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ Integer A '1' is considered valid (between 0 and 3). Integer C '1' is considered valid (between 0 and 3). ]]> - </screen> - </example> - </para> + </screen> + </example> </section> <section xml:id="filter.examples.sanitization"> @@ -134,7 +127,7 @@ $sanitized_c = filter_var($c, FILTER_SANITIZE_EMAIL); if (filter_var($sanitized_c, FILTER_VALIDATE_EMAIL)) { echo "This (c) sanitized email address is considered valid.\n"; echo "Before: $c\n"; - echo "After: $sanitized_c\n"; + echo "After: $sanitized_c\n"; } ?> ]]> @@ -154,7 +147,6 @@ After: [email protected] </section> </chapter> - <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -175,4 +167,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> - diff --git a/reference/filter/functions/filter-has-var.xml b/reference/filter/functions/filter-has-var.xml index 5e61364b9267..f452db1717f1 100644 --- a/reference/filter/functions/filter-has-var.xml +++ b/reference/filter/functions/filter-has-var.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. --> -<refentry xml:id="function.filter-has-var" xmlns="http://docbook.org/ns/docbook"> +<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filter-has-var"> <refnamediv> <refname>filter_has_var</refname> <refpurpose>Checks if a variable of the specified type exists</refpurpose> @@ -17,28 +17,26 @@ </refsect1> <refsect1 role="parameters"> &reftitle.parameters; - <para> - <variablelist> - <varlistentry> - <term><parameter>input_type</parameter></term> - <listitem> - <para> - One of <constant>INPUT_GET</constant>, <constant>INPUT_POST</constant>, - <constant>INPUT_COOKIE</constant>, <constant>INPUT_SERVER</constant>, or - <constant>INPUT_ENV</constant>. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>var_name</parameter></term> - <listitem> - <para> - Name of a variable to check. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> + <variablelist> + <varlistentry> + <term><parameter>input_type</parameter></term> + <listitem> + <para> + One of <constant>INPUT_GET</constant>, <constant>INPUT_POST</constant>, + <constant>INPUT_COOKIE</constant>, <constant>INPUT_SERVER</constant>, or + <constant>INPUT_ENV</constant>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>var_name</parameter></term> + <listitem> + <para> + Name of a variable to check. + </para> + </listitem> + </varlistentry> + </variablelist> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; diff --git a/reference/filter/functions/filter-id.xml b/reference/filter/functions/filter-id.xml index 7e5de3ec261f..61caee473a99 100644 --- a/reference/filter/functions/filter-id.xml +++ b/reference/filter/functions/filter-id.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. --> -<refentry xml:id="function.filter-id" xmlns="http://docbook.org/ns/docbook"> +<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filter-id"> <refnamediv> <refname>filter_id</refname> <refpurpose>Returns the filter ID belonging to a named filter</refpurpose> @@ -16,18 +16,16 @@ </refsect1> <refsect1 role="parameters"> &reftitle.parameters; - <para> - <variablelist> - <varlistentry> - <term><parameter>name</parameter></term> - <listitem> - <para> - Name of a filter to get. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para> + Name of a filter to get. + </para> + </listitem> + </varlistentry> + </variablelist> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; @@ -38,11 +36,9 @@ <refsect1 role="seealso"> &reftitle.seealso; - <para> - <simplelist> - <member><function>filter_list</function></member> - </simplelist> - </para> + <simplelist> + <member><function>filter_list</function></member> + </simplelist> </refsect1> </refentry> diff --git a/reference/filter/functions/filter-input.xml b/reference/filter/functions/filter-input.xml index 37382322721a..627d6745e415 100644 --- a/reference/filter/functions/filter-input.xml +++ b/reference/filter/functions/filter-input.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<refentry xml:id="function.filter-input" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xml:id="function.filter-input"> <refnamediv> <refname>filter_input</refname> <refpurpose>Gets a specific external variable by name and optionally filters it</refpurpose> @@ -67,10 +67,9 @@ <refsect1 role="examples"> &reftitle.examples; - <para> - <example> - <title>A <function>filter_input</function> example</title> - <programlisting role="php"> + <example> + <title>A <function>filter_input</function> example</title> + <programlisting role="php"> <![CDATA[ <?php $search_html = filter_input(INPUT_GET, 'search', FILTER_SANITIZE_SPECIAL_CHARS); @@ -79,16 +78,15 @@ echo "You have searched for $search_html.\n"; echo "<a href='?search=$search_url'>Search again.</a>"; ?> ]]> - </programlisting> - &example.outputs.similar; - <screen> + </programlisting> + &example.outputs.similar; + <screen> <![CDATA[ You have searched for Me & son. <a href='?search=Me%20%26%20son'>Search again.</a> ]]> - </screen> - </example> - </para> + </screen> + </example> </refsect1> <refsect1 role="seealso"> diff --git a/reference/filter/functions/filter-list.xml b/reference/filter/functions/filter-list.xml index a6561efa3982..8130ad977095 100644 --- a/reference/filter/functions/filter-list.xml +++ b/reference/filter/functions/filter-list.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. --> -<refentry xml:id="function.filter-list" xmlns="http://docbook.org/ns/docbook"> +<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filter-list"> <refnamediv> <refname>filter_list</refname> <refpurpose>Returns a list of all supported filters</refpurpose> @@ -31,18 +31,17 @@ <refsect1 role="examples"> &reftitle.examples; - <para> - <example> - <title>A <function>filter_list</function> example</title> - <programlisting role="php"> + <example> + <title>A <function>filter_list</function> example</title> + <programlisting role="php"> <![CDATA[ <?php print_r(filter_list()); ?> ]]> - </programlisting> - &example.outputs.similar; - <screen> + </programlisting> + &example.outputs.similar; + <screen> <![CDATA[ Array ( @@ -66,13 +65,11 @@ Array [17] => callback ) ]]> - </screen> - </example> - </para> + </screen> + </example> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/filter/functions/filter-var-array.xml b/reference/filter/functions/filter-var-array.xml index f32d7fe5a1ef..8e866de0f5de 100644 --- a/reference/filter/functions/filter-var-array.xml +++ b/reference/filter/functions/filter-var-array.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<refentry xml:id="function.filter-var-array" xmlns="http://docbook.org/ns/docbook"> +<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filter-var-array"> <refnamediv> <refname>filter_var_array</refname> <refpurpose>Gets multiple variables and optionally filters them</refpurpose> @@ -82,18 +82,17 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - An array containing the values of the requested variables on success, or &false; - on failure. An array value will be &false; if the filter fails, or &null; if + An array containing the values of the requested variables on success, or &false; + on failure. An array value will be &false; if the filter fails, or &null; if the variable is not set. </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; - <para> - <example> - <title>A <function>filter_var_array</function> example</title> - <programlisting role="php"> + <example> + <title>A <function>filter_var_array</function> example</title> + <programlisting role="php"> <![CDATA[ <?php @@ -133,9 +132,9 @@ var_dump(filter_var_array($data, $filters)); ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ array(6) { ["product_id"]=> @@ -158,9 +157,8 @@ array(6) { NULL } ]]> - </screen> - </example> - </para> + </screen> + </example> </refsect1> <refsect1 role="seealso">