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:
--
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