• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7700 for generic doc work for TWiki-6.0.2. Use View topic Item7703 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.

Item7776: MAKETEXT mis-renders mailto links within strong tags

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Confirmed      

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Discovered in the TWiki.ResetPassword code:

This code

%MAKETEXT{"...If none of your registered e-mail addresses is valid, and you have forgotten your password, contact [_1]." args="%WIKIWEBMASTER%"}%

works as expected:

...If none of your registered e-mail addresses is valid, and you have forgotten your password, contact peter09@thoenyNOSPAM.org.

However, this code does not:

<strong>%MAKETEXT{"Sorry, the password system is currently read only, please contact [_1]" args="%WIKIWEBMASTER%"}%</strong>

Sorry, the password system is currently read only, please contact peter09@thoeny.org

Note that the domain portion of the email address is not part of the mailto link.

  • screenshot:
    Item7776Screenshot.png

-- TWiki:Main/VickiBrown - 2017-03-11

Good catch. An inspection of the code reveals that MAKETEXT isn't the culprit.

  • The workaround: Insert a period before the closing </strong> tag:
    Sorry, the password system is currently read only, please contact peter09@thoenyNOSPAM.org.
    • I'll commit that to the code base. You can do it in your own installation if you don't want to wait for the next release.
  • The gory details: You found a quirk in TWiki's parser. The most obvious demonstration of this quirk is this: WikiWords are not converted to links if they are formatted as BoldWikiWord or ItalicWikiWord, but only if there's no other text within the emphasis: This link to WebHome gets formatted quite fine. I doubt that this ever was intentional, but it has to do with TWiki's heuristics where a WikiWord begins and ends. Mail addresses are somewhat special because without org at the end it is a link within the bold text, whereas with org at the end it is considered not link-able. Add a period at the end, and the link will happily include org. Issues around that have been discussed more than 10 years ago (see Item1217). There were changes forward and back again, I don't dare to change the regular expressions for fear of unwanted side effects.

-- TWiki:Main.HaraldJoerg - 2017-03-12

Thanks!

-- TWiki:Main.VickiBrown - 2017-03-29

ItemTemplate
Summary MAKETEXT mis-renders mailto links within strong tags
ReportedBy TWiki:Main.VickiBrown
Codebase 6.0.2
SVN Range TWiki-6.0.2-trunk, Sun, 12 Feb 2017, build 30309
AppliesTo Engine
Component

Priority Normal
CurrentState Confirmed
WaitingFor

Checkins TWikirev:30313
TargetRelease

ReleasedIn

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng Item7776Screenshot.png r1 manage 6.8 K 2017-03-12 - 00:00 VickiBrown screenshot
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2017-03-29 - VickiBrown
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback