[MAGNOLIA-4133] FCKEditor does not handle phonenumber-links properly Created: 19/Mar/12  Updated: 23/Mar/12  Resolved: 23/Mar/12

Status: Closed
Project: Magnolia
Component/s: fckeditor
Affects Version/s: 4.4.5, 4.5.1
Fix Version/s: 4.4.7

Type: Bug Priority: Major
Reporter: Daniel Wijk Assignee: Espen Jervidalo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux


Attachments: Text File mgnl_fix.txt    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

I am trying to use tel-links (http://www.marketingtechblog.com/hyperlink-phone-number/) in the FCKEditor.
Magnolia interprets them as internal links and mangles them up.
It make maintaining a mobile-site a bit of a pain.

The problem is that tel-links is not detected in the LinkUtil.EXTERNAL_LINK_PATTERN and thus is categorized as an internal link and treated as such.
Since the problem is occurring in the Loader for the FCKEditor you can still create the link and have it work if you refrain from editing the text afterwards. If you do edit the text however, the link will be corrupted.

Fix:

info.magnolia.link.LinkUtil.EXTERNAL_LINK_PATTERN should be changed from:
Pattern.compile("^(\\w*://|mailto:|javascript:).*");

to this:

Pattern.compile("^(\\w*://|mailto:|javascript:|tel:).*");


 Comments   
Comment by Daniel Wijk [ 19/Mar/12 ]

Smileys...
Ill Attach the end of the text as a file instead...

Comment by Daniel Wijk [ 19/Mar/12 ]

End of the issue as a file to avoid smileys...

Comment by Ondrej Chytil [ 19/Mar/12 ]

Thanks for reporting this Daniel, issue will be fixed in nearest bugfix release.

Comment by Espen Jervidalo [ 21/Mar/12 ]

Fixed as described in description.

Comment by Federico Grilli [ 23/Mar/12 ]

reopening cause unit test is missing

Generated at Mon Feb 12 03:52:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.