mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
fix #27021
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@149903 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
7bb0a9c5db
commit
e660313dda
1 changed files with 30 additions and 3 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue