Menu

accept file links in web document

2015-02-25
2015-03-06
  • marc_arbour

    marc_arbour - 2015-02-25

    Hi.

    Has anyone aver has success in adding file:/// links to url_validation_pattern or removing all form of validation whatsoever?

    I have tried blanking the url_validation_pattern variable in the config to no avail.

    Thanks in advance for any help.

    Best regards.

    Marc

     
  • Greg Sacrey

    Greg Sacrey - 2015-02-25

    Hey Marc,

    I have fought with this as well. I have loosened up the url validation considerably by replacing the default with the following.

    Use \ as an escape character to match the string and not have it perform a funciton. Important for [] and () and such.

    (http|https|ftp)://([\w-]+\.)+[\w-]+(/[\w- ./?%&=~#\[\]\(\)\'\!\$]*)?

    I have never tried it with file:///

    But I suspect something along the lines of adding file into it might work.

    Try this in place of the default.

    (http|https|ftp|file)://([\w-]+\.)+[\w-]+(/[\w- ./?%&=~#\[\]\(\)\'\!\$]*)?

    Hope this helps.

     

    Last edit: Greg Sacrey 2015-02-25
  • marc_arbour

    marc_arbour - 2015-03-02

    Thanks Greg.

    To make it work, I ended up putting .* as a url validation regex...

    Now, I can insert a file link, but when I click it in the document's page, I am not lead to it. If I copy-paste the link into a browser window... It works.

    EDIT: when I ctrl-click the link it works as well.

    Do you have any idea where I should look to get it to work with a simple left click?

    Best regards.

    Marc

     

    Last edit: marc_arbour 2015-03-02
    • Greg Sacrey

      Greg Sacrey - 2015-03-03

      Hey Marc,

      What is your entire url validator?

      I am curious if it needs something at the beginning.

       
  • marc_arbour

    marc_arbour - 2015-03-06

    Hi Greg,

    As I mentioned, my url validator is .* (dot star)

    It validates anything at all.

    Can you help on my single click issue?

    Best regards.

    Marc

     
  • Greg Sacrey

    Greg Sacrey - 2015-03-06

    Sorry I am not sure how to help with your issue.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.