Item13291: Wysiwyg swaps oder of query parameters and #anchor

Priority: Urgent
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Extension
Component: WysiwygPlugin
Branches: master
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
Per the anchor part (fragment) is last.

Unit test fails:

==anchoredLinkQuery== Expected TML:
[[FAQ.NetworkInternet?rev=1#Pomona_Network][Test Link]]
==anchoredLinkQuery== Actual TML:
[[FAQ.NetworkInternet#Pomona_Network?rev=1][Test Link]]
[[FAQ.NetworkInternet<<==== HERE actual 35 != expected 63

Issue was discovered while checking the System web topics for corruption when edited by Wysiwyg. The link that was corrupted was a the bottom of AppendixCascadingStyleSheets, [[][Test foswikiFocus]]. It stopped working after WYSIWYG save.

-- GeorgeClark - 05 Mar 2015

Fix works, and no longer corrupts correct links. But if the link started out wrong, it remains invalid.

-- GeorgeClark - 06 Mar 2015

I have fixup code working. During TML2HTML, if the position of a # is > -1 and < the position of a ?, then it parses it apart and swaps the anchor and query string. The question is do we want to do this?

-- GeorgeClark - 06 Mar 2015

Your fix is correct. I remember for a while I laboured under the mistaken impression that the params followed the anchor, and this codes dates to then.

-- CrawfordCurrie - 07 Mar 2015

ItemTemplate edit

Summary Wysiwyg swaps oder of query parameters and #anchor
ReportedBy GeorgeClark
Codebase trunk
SVN Range
AppliesTo Extension
Component WysiwygPlugin
Priority Urgent
CurrentState Closed
Checkins distro:7d0a4b9417bd distro:d3bd6f96d47b
TargetRelease major
ReleasedIn 2.0.0
CheckinsOnBranches master
masterCheckins distro:7d0a4b9417bd distro:d3bd6f96d47b
Topic revision: r4 - 05 Jul 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy