cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
You are here: Foswiki>Tasks Web>Item1200 (17 Dec 2011, GeorgeClark)Edit Attach

Item1200: Unexpected result when link text contains email address

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.4
Target Release: patch
Applies To: Engine
Component: FoswikiRender
Branches:
Reported By: CrawfordCurrie
Waiting For:
Last Change By: GeorgeClark
I don't think the link text (on the right-hand side) should autolink.

If you use something like

[[mailto:foo@bar.com][text including a foo@bar.com email address]]

the result is not as expected. The result is in three parts:

Lots of text including a foo@bar.com email address

(the source for which looks like

<a href="mailto&#58;foo&#64;bar&#46;com">Lots of text including a <a href="mailto&#58;foo&#64;bar&#46;com">foo&#64;bar.com</a> email address</a>

  • the expected link Lots of text including a
  • a separate link for foo@bar.com
  • the literal (unlinked ) string email address
Reproducible here at TWiki./org: v2.1.6

-- TWiki:Main/VickiBrown - 12 Jan 2009

I'm inclined to agree with Vicki on this one.

-- CrawfordCurrie - 04 Mar 2009

Changing the rendering order - processing square bracket links before email autolinking resolves the issue. The Square-bracket processing auto-escapes email addresses inside the link text. Fixed and added a unit test. Only committed to trunk for now - changing rendering order can be risky.

-- GeorgeClark - 21 Sep 2011

That didn't last long - got carried away with cherry-picking so this is applied to release 1.1. branch as well. All the rendering tests pass, so leaving it applied.

-- GeorgeClark - 22 Sep 2011

ItemTemplate edit

Summary Unexpected result when link text contains email address
ReportedBy CrawfordCurrie
Codebase 1.1.3, trunk
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component FoswikiRender
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:577df51db924 distro:50770270a9ad
TargetRelease patch
ReleasedIn 1.1.4
Topic revision: r8 - 17 Dec 2011, GeorgeClark - This page was cached on 22 Mar 2018 - 17:52.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License