From f51757bd16881b6429cccb115f36d595b80826a7 Mon Sep 17 00:00:00 2001 From: gohai Date: Tue, 9 Jun 2015 15:46:23 +0200 Subject: Fix InDesign crash with URLs containing more than one colon character Colons are valid characters in URLs, and used e.g. by the Internet Archive's Wayback Machine - a popular resource amongst researchers. When InDesign encounters a HyperlinkURLDestination with more than one colon character in it, it crashes when placing the ICML. (This was tested against CS6.) The IDML specification hints at this requirement in section 6.4.1: "The colon apppears in the Name attribute of the style, but is encoded as %3a when it appears in the Self attribute". Follow this example for all colon characters in URLs. --- tests/writer.icml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'tests/writer.icml') diff --git a/tests/writer.icml b/tests/writer.icml index 26795df58..b6f5b5e32 100644 --- a/tests/writer.icml +++ b/tests/writer.icml @@ -2717,39 +2717,39 @@ These should not be escaped: \$ \\ \> \[ \{ - + Black - HyperlinkURLDestination/http://google.com + HyperlinkURLDestination/http%3a//google.com - + Black - HyperlinkURLDestination/http://example.com/ + HyperlinkURLDestination/http%3a//example.com/ - + Black - HyperlinkURLDestination/mailto:nobody@nowhere.net + HyperlinkURLDestination/mailto%3anobody@nowhere.net - + Black - HyperlinkURLDestination/http://example.com/ + HyperlinkURLDestination/http%3a//example.com/ - + Black - HyperlinkURLDestination/http://example.com/?foo=1&bar=2 + HyperlinkURLDestination/http%3a//example.com/?foo=1&bar=2 @@ -2766,18 +2766,18 @@ These should not be escaped: \$ \\ \> \[ \{ HyperlinkURLDestination//script?foo=1&bar=2 - + Black - HyperlinkURLDestination/http://att.com/ + HyperlinkURLDestination/http%3a//att.com/ - + Black - HyperlinkURLDestination/http://example.com/?foo=1&bar=2 + HyperlinkURLDestination/http%3a//example.com/?foo=1&bar=2 @@ -2857,11 +2857,11 @@ These should not be escaped: \$ \\ \> \[ \{ HyperlinkURLDestination/ - + Black - HyperlinkURLDestination/mailto:nobody@nowhere.net + HyperlinkURLDestination/mailto%3anobody@nowhere.net @@ -2913,11 +2913,11 @@ These should not be escaped: \$ \\ \> \[ \{ HyperlinkURLDestination//url/ - + Black - HyperlinkURLDestination/http://example.com/?foo=1&bar=2 + HyperlinkURLDestination/http%3a//example.com/?foo=1&bar=2 -- cgit v1.2.3