Test case of
%ENCODE{ type="entity" }%
issue:
This is *bold*, _italic_, =fixed=, "quoted", |table|, %TOPIC%, %XYAB%, <angled>, & & [[linked]] text
Is added unescaped and escaped to form with edit fields in TWiki tables below:
Cairo escapes the following characters:
$text =~ s/\"/\&\#034;/g;
$text =~ s/\%/\&\#037;/g;
$text =~ s/\*/\&\#042;/g;
$text =~ s/\_/\&\#095;/g;
$text =~ s/\=/\&\#061;/g;
$text =~ s/\[/\&\#091;/g;
$text =~ s/\]/\&\#093;/g;
$text =~ s/\</\&\#060;/g;
$text =~ s/\>/\&\#062;/g;
$text =~ s/\|/\&\#124;/g;
This seems to be removed. Compare with Cairo,
TWiki:Sandbox.UrlEncodeTML
--
PTh
Hmm, seems to be halfway fixed on develop.twiki.org. Remaining issues:
- |table|cells| are not escaped
- But I can't save bug report if I add:
& and & and %VAR%
--
PTh
Dakar entity-encodes all the above characters since SVN 8230, except '|' which I had missed but added in SVN 8247. I don't understand the second part of your "remaining issues", above. Which do you mean, URL encoding or entity encoding? If you mean URL encoding, where does the requirement to URL encode TML come from? Dakar URL-encodes all the characters that need to be URL encoded as per RFC 1738; but it does not URL encode TML characters that are valid in URLs. However note that non-ISO-8859-1 characters are
not converted to UTF-8 before encoding.
CC
I am writing about entity-encoding as seen in the "Escaped (should work)" table above. It shows the issues. Escaped TML fed into an input field should be shown verbatim. From above example you can see that it is not.
Hmm, I could add and save now the ampersand. The other day I got an error on topic save. But now none of the TML entity encoding seems to work.
--
PTh
Oops, I put the | on the wrong side of the ] in SVN 8247.
CC