Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions appendices/filters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ fwrite($fp, "Ceci est un test.\n");
<![CDATA[
<?php
$fp = fopen('php://output', 'w');
stream_filter_append($fp, 'string.strip_tags', STREAM_FILTER_WRITE, "<strong><em><span>");
fwrite($fp, "<strong>Ce texte en gras</strong> finit par être agrandi <h1>en un titre 1</h1>\n");
stream_filter_append($fp, 'string.strip_tags', STREAM_FILTER_WRITE, "<b><i><u>");
fwrite($fp, "<b>Ce texte en gras</b> finit par être agrandi <h1>en un titre 1</h1>\n");
fclose($fp);
/* affiche : Ce texte en gras finit par être agrandi en un titre 1 */

$fp = fopen('php://output', 'w');
stream_filter_append($fp, 'string.strip_tags', STREAM_FILTER_WRITE, array('strong','em','span'));
fwrite($fp, "<strong>Ce texte en gras</strong> finit par être agrandi <h1>en un titre 1</h1>\n");
stream_filter_append($fp, 'string.strip_tags', STREAM_FILTER_WRITE, array('b','i','u'));
fwrite($fp, "<b>Ce texte en gras</b> finit par être agrandi <h1>en un titre 1</h1>\n");
fclose($fp);
/* affiche : Ce texte en gras finit par être agrandi en un titre 1 */
?>
Expand Down
10 changes: 5 additions & 5 deletions reference/fdf/examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@
// show_publisher et show_preparer.
$fdf = fdf_open_string($HTTP_FDF_DATA);
$volume = fdf_get_value($fdf, "volume");
echo 'Le champ Volume contient la valeur : "<strong>' . $volume . '</strong>"<br />';
echo 'Le champ Volume contient la valeur : "<b>' . $volume . '</b>"<br />';

$date = fdf_get_value($fdf, "date");
echo 'La valeur du champ date était "<strong>' . $date . '</strong>"<br />';
echo 'La valeur du champ date était "<b>' . $date . '</b>"<br />';

$comment = fdf_get_value($fdf, "comment");
echo 'La valeur du champ comment était "<strong>' . $comment . '</strong>"<br />';
echo 'La valeur du champ comment était "<b>' . $comment . '</b>"<br />';

if (fdf_get_value($fdf, "show_publisher") == "On") {
$publisher = fdf_get_value($fdf, "publisher");
echo "La valeur du champ Publisher était : '<strong>" . $publisher . "</strong><br />";
echo "La valeur du champ Publisher était : '<b>" . $publisher . "</b><br />";
} else
echo 'La valeur du champ Publisher ne doit pas être affichée.<br />';

if (fdf_get_value($fdf, "show_preparer") == "On") {
$preparer = fdf_get_value($fdf, "preparer");
echo 'La valeur du champ Preparer était "<strong>' . $preparer . '</strong>"<br />';
echo 'La valeur du champ Preparer était "<b>' . $preparer . '</b>"<br />';
} else
echo 'La valeur du champ Preparer ne doit pas être affiché.<br />';
fdf_close($fdf);
Expand Down
6 changes: 3 additions & 3 deletions reference/strings/functions/html-entity-decode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@
<programlisting role="php">
<![CDATA[
<?php
$orig = 'J\'ai "sorti" le <strong>chien</strong> tout à l\'heure';
$orig = 'J\'ai "sorti" le <b>chien</b> tout à l\'heure';
$a = htmlentities($orig);
$b = html_entity_decode($a);

echo $a, PHP_EOL; // J'ai &quot;sorti&quot; le &lt;strong&gt;chien&lt;/strong&gt; tout &amp;agrave; l'heure
echo $b, PHP_EOL; // J'ai "sorti" le <strong>chien</strong> tout à l'heure
echo $a, PHP_EOL; // J'ai &quot;sorti&quot; le &lt;b&gt;chien&lt;/b&gt; tout &amp;agrave; l'heure
echo $b, PHP_EOL; // J'ai "sorti" le <b>chien</b> tout à l'heure

?>
]]>
Expand Down
2 changes: 1 addition & 1 deletion reference/strings/functions/htmlentities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
<programlisting role="php">
<![CDATA[
<?php
$str = 'Un \'apostrophe\' en <strong>gras</strong>';
$str = 'Un \'apostrophe\' en <b>gras</b>';

echo htmlentities($str);
echo "\n\n";
Expand Down