1
0
mirror of https://github.com/php/doc-de.git synced 2026-03-24 07:12:15 +01:00
Files
archived-doc-de/reference/strings/functions/htmlspecialchars-decode.xml
Martin Samesch cf6b595340 sync with EN
2021-12-30 15:48:41 +01:00

215 lines
6.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: eabde0419cf90f596f60db00e31fcb6ebe41ac55 Maintainer: sammywg Status: ready -->
<!-- Reviewed: yes -->
<!-- Rev-Revision: e4b52745bc8ef288726f8e76e7fdc6277a2f656f Reviewer: samesch -->
<refentry xml:id="function.htmlspecialchars-decode" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>htmlspecialchars_decode</refname>
<refpurpose>Wandelt besondere HTML-Entities zurück in Zeichen um</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>htmlspecialchars_decode</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401</initializer></methodparam>
</methodsynopsis>
<para>
Diese Funktion ist das Gegenstück zu <function>htmlspecialchars</function>.
Sie wandelt besondere HTML-Auszeichnungen zurück in Zeichen um.
</para>
<para>
Die umgewandelten Entities sind:
<literal>&amp;amp;</literal>, <literal>&amp;quot;</literal> (wenn
<constant>ENT_NOQUOTES</constant> nicht gesetzt ist),
<literal>&amp;#039;</literal> (wenn <constant>ENT_QUOTES</constant> gesetzt
ist), <literal>&amp;lt;</literal> und <literal>&amp;gt;</literal>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>string</parameter></term>
<listitem>
<para>
Die zu dekodierende Zeichenkette.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
Eine Bitmaske von einem oder mehreren der folgenden Flags, die die
Behandlung von Anführungszeichen sowie den zu nutzenden Dokumententyp
festlegen. Der Standardwert ist <literal>ENT_QUOTES | ENT_SUBSTITUTE |
ENT_HTML401</literal>.
<table>
<title>Verfügbare <parameter>flags</parameter>-Konstanten</title>
<tgroup cols="2">
<thead>
<row>
<entry>Name der Konstante</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry><constant>ENT_COMPAT</constant></entry>
<entry>
Wandelt doppelte Anführungszeichen um und lässt einfache
Anführungszeichen unverändert.
</entry>
</row>
<row>
<entry><constant>ENT_QUOTES</constant></entry>
<entry>
Wandelt sowohl doppelte als auch einfache Anführungszeichen um.
</entry>
</row>
<row>
<entry><constant>ENT_NOQUOTES</constant></entry>
<entry>
Lässt sowohl doppelte als auch einfache Anführungszeichen
unverändert.
</entry>
</row>
<row>
<entry><constant>ENT_SUBSTITUTE</constant></entry>
<entry>
Ersetzt ungültige Code-Unit-Sequenzen mit dem
Unicode-Ersatzzeichen U+FFFD (UTF-8) oder &amp;#xFFFD;
(andernfalls), anstatt eine leere Zeichenkette zurückzugeben.
</entry>
</row>
<row>
<entry><constant>ENT_HTML401</constant></entry>
<entry>
Behandle Code als HTML 4.01.
</entry>
</row>
<row>
<entry><constant>ENT_XML1</constant></entry>
<entry>
Behandle Code als XML 1.
</entry>
</row>
<row>
<entry><constant>ENT_XHTML</constant></entry>
<entry>
Behandle Code als XHTML.
</entry>
</row>
<row>
<entry><constant>ENT_HTML5</constant></entry>
<entry>
Behandle Code als HTML 5.
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Gibt die dekodierte Zeichenkette zurück.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.1.0</entry>
<entry>
<parameter>flags</parameter> geändert von
<constant>ENT_COMPAT</constant> zu <constant>ENT_QUOTES</constant> |
<constant>ENT_SUBSTITUTE</constant> | <constant>ENT_HTML401</constant>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Ein <function>htmlspecialchars_decode</function>-Beispiel</title>
<programlisting role="php">
<![CDATA[
<?php
$str = "<p>this -&gt; &quot;</p>\n";
echo htmlspecialchars_decode($str);
// Beachten Sie, dass die Anführungszeichen nicht umgewandelt werden
echo htmlspecialchars_decode($str, ENT_NOQUOTES);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
<p>this -> "</p>
<p>this -> &quot;</p>
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>htmlspecialchars</function></member>
<member><function>html_entity_decode</function></member>
<member><function>get_html_translation_table</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->