nlopess Tue Jan 27 11:01:45 2004 EDT
Modified files:
/phpdoc/en/reference/strings/functions strip-tags.xml
Log:
fix #27021
http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/strip-tags.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/strings/functions/strip-tags.xml
diff -u phpdoc/en/reference/strings/functions/strip-tags.xml:1.4
phpdoc/en/reference/strings/functions/strip-tags.xml:1.5
--- phpdoc/en/reference/strings/functions/strip-tags.xml:1.4 Mon Dec 22 10:42:17
2003
+++ phpdoc/en/reference/strings/functions/strip-tags.xml Tue Jan 27 11:01:45
2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strip-tags">
<refnamediv>
@@ -26,7 +26,7 @@
<note>
<para>
<parameter>allowable_tags</parameter> was added in PHP 3.0.13
- and PHP 4.0b3.
+ and PHP 4.0b3. Since PHP 4.3.0, HTML comments are also stripped.
</para>
</note>
</para>
@@ -36,10 +36,37 @@
<programlisting role="php">
<![CDATA[
<?php
-$string = strip_tags($string, '<a><b><i><u>');
+$text = '
+<p>Test paragraph.</p>
+<!-- Comment -->
+Other text';
+
+echo strip_tags($text);
+
+echo "\n\n-------\n";
+
+// allow <p>
+echo strip_tags($text, '<p>');
?>
+
]]>
</programlisting>
+ <para>
+ The above example will output:
+ </para>
+ <screen>
+<![CDATA[
+Test paragraph.
+
+Other text
+
+-------
+
+<p>Test paragraph.</p>
+
+Other text
+]]>
+ </screen>
</example>
</para>
<warning>