• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CS6 hyperlink problem

Contributor ,
Jun 01, 2012 Jun 01, 2012

Copy link to clipboard

Copied

Hi everyone,

 

In Indesign CS6, I created a new URL hyperlink and pasted the following link into the field:

http://law.ato.gov.au/atolaw/view.htm?docid=AID/AID2004688/00001

But when I click OK and then look in the URL field in the hyperlinks panel, I see that Indesign has changed the link to the following:

http://law.ato.gov.au/atolaw/view.htm%3Fdocid%3DAID/AID2004688/00001

Notice how it's swapping out the question mark (?) after .htm with %3F.

It's also swapping out the equals sign (=) with %3D.

This breaks the URL and makes it no longer workable.

I tried reinstalling Indesign but the problem still remains.

I wondered if anyone knows why this is happening and whether there's a workaround?

Appreciate any help.

Views

63.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 04, 2012 Jun 04, 2012

@gwhPoster – That seems to be an encoding problem. Do you use a prerelease beta version of InDesign CS6?

 

Background:
It seems that every URL that is filled in in the Hyperlink palette is encoded with something like encodeURI() (a global ExtendScript function):

string encodeURI (text: string)

Encodes a string after RFC2396.

Create an UTF-8 ASCII encoded version of this string. The string is converted into UTF-8. Every non-alphanumeric character is encoded as a percent escape character of th

...

Votes

Translate

Translate
Contributor ,
Aug 28, 2013 Aug 28, 2013

Copy link to clipboard

Copied

Hi,

I'd just swapped back to CS6 for a few days as CC was crashing on me so I haven't used the Hyperlinks for those days.

Your post prompted me to open CC and I'm happy to say my version of InDesignCC, 9.1,the Hyperlinks are working as they were intended to.

Finally!!!!

Tony

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 30, 2013 Sep 30, 2013

Copy link to clipboard

Copied

CS6 users can now rejoice... latest update claims to fix this...

http://helpx.adobe.com/indesign/release-note/indesign-cs6-2-release-notes.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 01, 2013 Oct 01, 2013

Copy link to clipboard

Copied

Thank you for sharing this.
I couldn't test it yet.

My German InDesign CS6 v8.0.1 is showing no updates.
Maybe in a couple of hours or days?

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 06, 2012 Jul 06, 2012

Copy link to clipboard

Copied

@Aussie_leah – can you provide a test case for me? Just an IDML exported that I can download to test my script?
What kind of hyperlinks are you using?

The script handles only destinations based on URLs…

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 06, 2012 Jul 06, 2012

Copy link to clipboard

Copied

Hi Laubender,

I've just upgraded to CS 6, stumbled across the same problem, and found this forum post. I've also posted a bug report so hopefully the more of us report reported the faster they may fix it.

Thanks very much for the script, I'm on Mac OSx and it worked perfectly, will be a great help until Adobe fix the problem.

Cheers,

Tony

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 07, 2012 Jul 07, 2012

Copy link to clipboard

Copied

@Tony – thank you for giving me positive feedback…

I wonder if the bug is present in the MS Windows version of InDesign CS6?
I'm still on Mac OS X 10.6.8…

And also wonder how this bug could slip through quality control. The new features of InDesign CS6 are very much centric to Digital-Publishing, Pad-, Phone-Publishing, and the Hyperlinks palette is central for building navigational elements in that area…
A glitch like that could damage the overall good user experience of the new version…

@gwhPoster – did you ever try out my script?

Did it solve the problem for you?

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 07, 2012 Jul 07, 2012

Copy link to clipboard

Copied

Hi Laubender,

 

No problem, your script is a great help.

I just loaded a trial version of old Windows XP machine I've got, and can confirm that the problem is also on the Windows version.

The good news is that your script works just as well on Windows as it does on Mac OS X.

Tony

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 24, 2012 Jul 24, 2012

Copy link to clipboard

Copied

The script worked perfectly for me. In fact, it worked so well and quickly that if I hadn't run a script before, I probably would have thought nothing happened. I saw the telltale asterisk that appears when the file has been changed so I knew it executed.

Thanks so much for your help, Uwe. You truly do make a difference!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 01, 2012 Aug 01, 2012

Copy link to clipboard

Copied

We were having this same problem (Windows 7 & Windows XP)  and your script works great.   What a relief.  We publish a 4000 page book annually with close to 25,000 links, so you have saved me.  Thanks so much.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 01, 2012 Aug 01, 2012

Copy link to clipboard

Copied

@KarynRH & @ktroutman – thank you both for your positive feedback.

The original poster (OP), "gwhPoster", really should mark my answer in #1 as "correct"…
But maybe he did not try out the script and is still waiting for a bug fix in the upcomming InDesign version 8.0.1, which is not announced, yet.

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 01, 2012 Aug 01, 2012

Copy link to clipboard

Copied

He should definitely mark it as correct. I used the script again today. I can't say I ever have a 4,000 page book or 25,000 links, but even with a half dozen links, it makes me very happy!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 01, 2012 Aug 01, 2012

Copy link to clipboard

Copied

I marked it -- one of the perks of being a moderator....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 01, 2012 Nov 01, 2012

Copy link to clipboard

Copied

Hi I tried running the script but it threw up this error:

Screen Shot 2012-11-01 at 11.12.06.png

I think it's maybe beause my link is a "Share to Twitter" and includes the text for the pre-written tweet.
Where this link is 'breaking' is the first url character between "tweet" and "text". It should read "tweet?text" not "tweet%3Ftext".
This is the only character that needs reverting. I'm asuming this kind of operation is too complex for a script?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 01, 2012 Nov 01, 2012

Copy link to clipboard

Copied

@Magic_monkey – Too complex? Hm. I don't think so. Maybe there are other obstacles in place here… Maybe it's too long?

Can you poste the full link here?

"tweet%3Ftext" in itself is not disturbing the procedure.
It will translate to "tweet?text".

See the following JavaScript snippet. If you open your ExtendScriptToolkit app (ESTK) and you are running the snippet, you see the correct result in the JavaScript Console (EDIT: together with an alert):

var stringToDecode = "tweet%3Ftext";

var decodedString = decodeURI(stringToDecode);

$.writeln("Decoded String:"+"\t"+decodedString);

alert("Decoded String:"+"\t"+decodedString);

Instead of "tweet%3Ftext" you could test with the whole URL string and report back here, if it goes right or wrong.

Uwe

Message was edited by: Laubender

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 01, 2012 Nov 01, 2012

Copy link to clipboard

Copied

I haven't used JavaScript before so I don't really know what I'm doing but I put that snippet into the ESTK and I think it worked.
I tried it again with the full URL

http://twitter.com/intent/tweet%3Ftext%3DJust%2520read%2520Top%252010%2520Tips%253A%2520Axe%2520unne...

and it worked again, I think.
Screen Shot 2012-11-01 at 13.18.47.png

Thanks for taking your time to help me with this!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 01, 2012 Nov 01, 2012

Copy link to clipboard

Copied

@Magic_monkey – thank you for the full URL.

If I run the the full URL with the snippet and copy it from the ESTK Console to my browser it seems to work:

TwitterURLinBrowser.png


Don't know why it does not work within InDesign CS6.
Cannot test that right now…

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 06, 2012 Nov 06, 2012

Copy link to clipboard

Copied

I found Uwe Laubender's script fails if you have internal links in your indd file. I made some enhancements to the script and pulled out the undo structure since I figured I could just save the doc under a new name if I was worried about it.

I also added console messages listing the updates, and added a success message at the end to give some comfort that things worked okay.

If you have external doc reference links, this script will fail since it loses context once the externally referenced document comes up. You can look at the console messages to determine which link is the problem - I've found the script processes the links from the bottom up when you compare it to the links in the hyperlink panel.

With this script, I'm able to keep using CS6 ... I'm not so surprised a bug like this crept into InDesign CS6, what surprises me more is the product's now 6 months old and something this fundamental has still not been fixed.

//DecodeURI_AllHyperlinks_2.jsx

//DESCRIPTION:Decodes all hyperlink destination URLs and names

//Uwe Laubender - enhanced by Joe Fugate

var d = app.documents[0];

var allHyperlinks = d.hyperlinks;

var totalLinks = allHyperlinks.length;

var repairedLinks = 0;

for(var n=0;n<allHyperlinks.length;n++){

   

    if ("documentPath" in allHyperlinks.destination) {

        var docPath = allHyperlinks.destination.documentPath;

        var linkName = allHyperlinks.name;

        $.writeln("Link " + n + ": " + linkName + ": URL: " + docPath + " external link");

        continue;

    };

   

    if ("destinationURL" in allHyperlinks.destination) {

        repairedLinks = repairedLinks + 1;

        var linkName = allHyperlinks.name;

        var newDestURL = decodeURI(allHyperlinks.destination.destinationURL);

        var newDestName = decodeURI(allHyperlinks.destination.name);

   

        allHyperlinks.destination.destinationURL = newDestURL;

        try{

            allHyperlinks.destination.name = newDestName;

        }catch(e){};

       

        $.writeln("Link " + n + ": " + linkName + ": URL: " + newDestURL + " repaired");

       

    } else {$.writeln("Link " + n + ": " + linkName + ": Not a URL link");};

};

alert("Successfully repaired "+ repairedLinks + " URLs");

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2012 Nov 06, 2012

Copy link to clipboard

Copied

@aybee101 – thank you for testing and enhancing the script.

Maybe the ones who have trouble using the original version of the script will try another time with the new version to get their links in order…

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 22, 2013 Jul 22, 2013

Copy link to clipboard

Copied

Great work Uwe! The script worked perfectly for me.

There's plenty of others reporting this bug here:

http://forums.adobe.com/message/4993979

I had also tried remaking the links in Acrobat. They tested fine after closing form editor, but on reopening the pdf, the encoding had changed.

InD 8.01, Acro 10.1.7, Win7/64, multiple pdf versions tried (Acro 5 and up).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 22, 2013 Jul 22, 2013

Copy link to clipboard

Copied

@afsdfasg – Wow.

If I get it right what you and the reports in your linked thread says…

The disease has spread…

to Acrobat Pro!

And: newer security updates to Acrobat Pro 9 could also be affected.

Not only Acrobat Pro X or XI.
I have to check myself;  I'm still doing 99% of my Acrobat work in version 9.4.4.

Not in the last supported one: 9.5.5.

According to this:

http://helpx.adobe.com/acrobat/release-note/release-notes-acrobat-reader.html

the latest and final release.

Acrobat Pro 10.1.7 is also installed, but not frequently used…

For hyperlinks generated in Acrobat Pro, can you specify the exact versions the bug occurs?

It seems to me that it would be extremely important for InDesign users to know about that.

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 25, 2013 Jul 25, 2013

Copy link to clipboard

Copied

My fix for problem with Adobe InDesign converting special characters in hyperlinks (e.g., hyperlinking images) does not involve any scripting or plug-ins.

I ran into the problem when trying to encode an AddThis social media sharing link that contained numerous special characters into an Interactive PDF end document such that when clicking on the link viewing the Interactive PDF online, it would crash Chrome, et al. browsers.  They worked fine when viewing the PDF from my computer, but as soon as I uploaded the PDF to my website and viewed it from a browser - no workie.

For example, InDesign would convert this:

addthis.com/bookmark.php?v=250&pubid=

To this:

addthis.com/bookmark.php%3Fv%3D250%26pubid%3D (effectively destroying the link)

How I worked around this is I would select the image I wanted to hyperlink, and paste the desired hyperlink into the URL window in the hyperlink panel.  Then I would go to the flyout menu of the hyperlink panel and select Hyperlink Destination Options.  I would then select Edit and paste in the actual URL I wanted and select OK. In the Hyperlinks panel, I would double check the URL displaced in the selected hyperlink.  Sometimes it was correct, but sometimes when repeating this process with other hyperlinked images, it was not.  When it wasn't correct, I would click on the down arrow in the URL window in the Hyperlink panel which opens up all of the hyperlinks ID has "recorded".  I would manually find the correct hyperlink that was entered in the "select Edit" step above.  This would ensure the correct formatted hyperlink with special characters was being used.  I would then save the doc. Export to Interactive PDF, and then upload the doc to my website.  When I navigated to the website in my browser, and clicked on the hyperlinks in question, they now work perfectly given the special characters where now preserved in the coding of the hyperlink.

Done.  No java scripts.  No plugins.  I just used the features of the tool that it took me two days experimenting with.  I haven't tried this with Buttons yet, I expect it would work the exact same way.

Hope this helps save someone some time

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 25, 2013 Jul 25, 2013

Copy link to clipboard

Copied

That's a great workaround. Seems, however, that Adobe ought to recognize this bug & send us all a new version bug-free & at no cost.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 25, 2013 Jul 25, 2013

Copy link to clipboard

Copied

No kidding.  Seems like the tool is attempting to treat special characters as text it then converts into the hyperlink equivalent character (e.g., where a character space is represented as %20; an "&" is respresented as %26; equals sign "=" is represented by %3D; or whose where a "%" is represented by %25 in a hyperlink).  I use a lot of complex crazy long hyperlinks with lots of special characters for social media and mailto:liinks where I automatically populate the Subject line and Body with text.  I was just glad I didn't have to get into crazy scripting or pluggins to solve the problem.

All the best.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 26, 2013 Jul 26, 2013

Copy link to clipboard

Copied

I find the script to be exceptionally easy to use. Since I usually have quite a few links, the efficiency and speed of the script is important to me; one click and I'm done. But I'm glad people are finding other workarounds.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 08, 2017 Dec 08, 2017

Copy link to clipboard

Copied

Thankyou so much for this, it's helped me fix what I've been struggling with all morning!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines