Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Correcting Hyper Links

Return to Member Forum

  • Author
    Posts
    • #65019
      Mark Gilvey
      Member

      My author discovered that hyperlinks containing a “/” at the end of his shortened goo.gl links will not work. So I need to do a search and replace.

      1. How can I search for the Hyperlink with the / an replace it with a version of the URL without the /

      2. How can I search for the / at the end of other Hyperlinks in the document and remove it.

      There are over 1000 hyperlinks in this file so doing it by hand is out of the question. That said, at least 200 of them go to this particular URL but I want to make sure the / isn’t on other hyperlinks.

      I’m sure I could do this in DreamWeaver but I’d rather take care of it at the source than band-aid it later.

    • #65020
      David Blatner
      Keymaster

      Ouch. ID does not make this easy.
      I wonder if you could do it by exporting to IDML, then opening that IDML in an XML program (like oxygen) and doing the find/change there.

      • #65024
        Mark Gilvey
        Member

        Hi David,

        I was hoping you wouldn’t say that. I saw that post on how to do that.

    • #65022
      Anonymous
      Inactive

      You could try

      (/.{6})/
      $1

      This is assuming all the goo.gl links have the same format and the slash you want to get rid of follows immediately after the link. It will also grab any 6 letter word will a slash at both ends so watch out for that, it’s not 100% robust.

      • #65029
        Mark Gilvey
        Member

        Salieri,

        That looks like it is getting close but I’m not sure “watch out for that” with about 1000 links is something I want to go through and, well, as you say, watch out for ;-)

        I went through and did a search and replace in an extracted epub file using DMX telling it to find /”> and replace with “> It found a bunch of the link in question but also found other longer URLs (longer than 6 characters) that also had the issue. That would mean that if I wanted to solve this issue further up the chain, I would need some kind of grep I guess that would find just the trailing /. Is that even possible?

    • #65025
      David Blatner
      Keymaster

      Mark, I just want to confirm: It’s relatively easy to remove the slash from the text (using something like @Salieri’s grep find/change). It’s just not easy to change the underlying hyperlinks… the stuff in the Hyperlinks panel.

      • #65030
        Mark Gilvey
        Member

        Hi David,

        Yes, it’s the underlying hyperlink that I need to fix. I opened the Hyperlink palette (you can’t even arrow down do advance to the next link, oye!) and as I go down the list, I can see links that have this trailing / that I want to get rid of. If there were a way to just target them, that would probably work. I think @Salieri’s suggestion is great but with as many links as I have, I think I need to narrow it down more.

    • #65031
      Mark Gilvey
      Member

      Adobe might be able to do a cool thing if on the Hyperlink palette, if the same hyperlink exists more than once, you should only have one instance of it on the palette. If I only had one link being pulled in all those instances I’d be done with that link issue and would have fewer links to deal with as well. Maybe if they structured it like they do in AI where you double click an object and drill down to it and it toggles down on the Layers palette that you can see all the components or in this case the instances. Hope that makes sense.

    • #65033
      David Blatner
      Keymaster

      Well, that is actually what shared hyperlink destinations are about. If the person used a shared hyperlink destination, then you can change it once in the Hyperlink Destination Options dialog box (from the panel menu) and it changes it throughout.

    • #65036
      Mark Gilvey
      Member

      Hi David,

      I was reading Create A Hyperlink To Any Shared Destination (https://help.adobe.com/en_US/indesign/cs/using/WSB152EA6F-30D9-417c-9E16-A2C492C04892.html) and these particular instructions seem to be for creating links that go to other pages, not URLs. That said, it talks about having all the files open that the link goes to (I have a single file) but I’m not understanding how to connect the dots. If I have “this text linking” to a website in 200 different places and I create the hyper link ON that text for the first time, how is it going to share the destination with all the rest. But I’m getting ahead of myself here because that is probably what I would do if I was creating the link for the first time.

      In my case, I have imported a Word doc that already has all the text hyperlinked.

    • #65047
      Anonymous
      Inactive

      Ah, sorry I didn’t see exactly what you meant, apologies for leading you down a blind red herring alley. I had a similar issue recently where ID helpfully added %25 to all the spaces in the hyperlinks which broke them all. The only thing I could do was paste them back in again into the top field in the hyperlinks palette one by one, so if you come up with something good I’d be pleased to hear it.

    • #65073
      Mark Gilvey
      Member

      Hi guys,

      The only solution I could figure out to this problem is to apply the correct URL to the text and then I could copy that text, Find that text (when it does that it finds the entire block and highlights it) and paste to replace it. This was an acceptable amount of pain. I did notice that it created a lot of hyperlinks in the hyperlink palette with the same number. I need to learn how to associate them all to a single one but better yet, INDD should do this when it imports the Word file.

      While I was doing this, another problem was discovered but I’ll put that in a separate post.

Viewing 8 reply threads
  • The forum ‘EPUB and eBook’ is closed to new topics and replies.
Forum Ads