• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Test case of %ENCODE{ type="entity" }% issue:

This is *bold*, _italic_, =fixed=, "quoted", |table|, %TOPIC%, %XYAB%, <angled>, & &amp; [[linked]] text
Is added unescaped and escaped to form with edit fields in TWiki tables below:

Unescaped (should fail): <input type="string" value="This is bold, italic, fixed, "quoted", table , Item1380, %XYAB%, , & & linked text" size="80" />

Escaped (should work):

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 &amp; 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

ItemTemplate
Summary TML not URL-entity-encoded
ReportedBy PeterThoeny
Codebase

SVN Range Tue, 10 Jan 2006 build 8208
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins 8247 8253
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2006-01-12 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback