Rob Church schrieb:
On 14/09/2007, Michael Heyder
<Info(a)hafenvolleyballer.de> wrote:
Hi,
the following problem: htmlcode is ignored
$body.=wfElement('label',array(),wfMsg('naw-page-1-label-1'));
Output:
Gib hier Bitte einen <strong>aussagekrÀftigen</strong>
Intentional; the XML building functions (wfElement() et al. have now
been deprecated in favour of Xml::element() et al.) will escape
contents, attributes, etc. to ensure it's all appropriate for
inclusion in XHTML.
To generate an element with unescaped contents, use Xml::tags() (where
available), or wfOpenElement() and wfCloseElement().
In general, label text shouldn't be permitted to contain arbitrary
HTML, as this can cause validation errors. Your actual problem here is
that the message isn't defined, and the default is therefore
<naw-page-1-label-1> which is escaped. Fix that.
Rob Church
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l Hi Rob
thanks for the hint, but I make a test ...
$body.=xml::element('p',array(),wfMsg('naw-page-1-label-1'));
$allMessages["de"]["naw-page-1-label-1"]="Gib hier Bitte einen
<strong>aussagekräftigen</strong> Title für die Seite an.<br />
Der ursprünglich gewählte Titel kann auch nochmal verändert werden.";
the out:
Gib hier Bitte einen <strong>aussagekräftigen</strong> Title für die
Seite an.<br /> Der ursprünglich gewählte Titel kann auch nochmal
verändert werden.
Your actual problem here is
that the message isn't defined, and the default is therefore
<naw-page-1-label-1> which is escaped. Fix that.
it's obvious, that the message ist definied. I take a look at the xml.class:
$out .= '>' . htmlspecialchars( $contents ) . "</$element>";
regards
mic