Item13291: Wysiwyg swaps oder of query parameters and #anchor
Priority: Urgent
Current State: Closed
Released In: 2.0.0
Target Release: major
Per
http://tools.ietf.org/html/rfc3986#section-4.1 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]]
==anchoredLinkQuery==
[[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,
[[http://foswiki.org/Tasks/Item13291?testfocus=1#TestFoswikiFocus][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