Subject: | Not converting '&' to '&' |
I'm using Text::WikiCreole in a system generating XHTML strict, which
requires that the XML be well-formed.
However input to creole_parse containing an '&' on its own it is passed
straight through resulting in non-conforming output.
I know that converting '&' to '&' is not strictly required according
to the wiki-creole spec but as Text::WikiCreole is a text => (x)html
converter I believe it should be producing something that won't cause
xml parsers to croak.
By the way, I've been using the following in a similar situation:
# don't hit existing &code; elements
$data =~ s/\&(?!\w+\;)/\&\;/g;
Cheers,
Mark.
--
Mark Lawrence