[MAGNOLIA-921] samples/paragraphs/link.jsp index of :// is incorrect Created: 10/Jun/06  Updated: 23/Jan/13  Resolved: 11/Jun/06

Status: Closed
Project: Magnolia
Component/s: samples
Affects Version/s: 2.1.5
Fix Version/s: 3.0 RC1

Type: Bug Priority: Minor
Reporter: James Reynolds Assignee: Boris Kraft
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 2m
Time Spent: Not Specified
Original Estimate: 2m

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   

This:
if (html.indexOf("://")==-1) html.append("http://"link"\" target=\"_blank\">");

Should be:

if (link.indexOf("://")==-1) html.append("http://"link"\" target=\"_blank\">");
else html.append(link+"\" target=\"_blank\">");



 Comments   
Comment by Boris Kraft [ 10/Jun/06 ]

IIRC the original logic meant that external links will be opened in a new window wheras internal links are not. With your patch all links will be opened in external windows, right? Thats not what we want

Comment by James Reynolds [ 11/Jun/06 ]

Sorry, I should have been more verbose. I think this patch fixes the links. That is, when a user created link includes http:// (or any protocol), it isn't removed. But with this patch, it is.

Comment by James Reynolds [ 11/Jun/06 ]

I mean, the protocol isn't removed, but http:// isn't appended. For example, if a user creates a link:

telnet://some.server.com

without the patch it is changed to:

http://telnet://some.server.com

Comment by Boris Kraft [ 11/Jun/06 ]

You are right, I did not check the code, this part is only executed for external links in the first place.

Comment by Boris Kraft [ 11/Jun/06 ]

Fixed

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