ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Parse URLs plugin problem

March 19, 2011 9:01am

Subscribe [3]
  • #1 / Mar 19, 2011 9:01am

    o_cee

    16 posts

    The Parse URLs plugin fails on the following URL.. Which isn’t very nice, but valid non the less.

    <a href="http://news.efra.ws/fileadmin/news/2011/03/Microsoft">http://news.efra.ws/fileadmin/news/2011/03/Microsoft</a> Word - muffler list 2011 for publication V1 (1).pdf

    It displays “news.efra.ws).pdf” when using:

    {exp:parse_url parts="host" omit="www."}{source}{/exp:parse_url}

    Any ideas?

  • #2 / Mar 19, 2011 7:31pm

    o_cee

    16 posts

    Hmm ok, the regex in pi.parse_url.php at line 79 does check for ) to end the string.. Strange, don’t see why.

    Changing the regex to

    "#(http(s?)://|www\.*)([a-z0-9@%_.~\#\/\-\?&=]+)[^\s\<]+#i"

    does the trick for me, but I’m sure there’s some good reason for the way it’s designed?

  • #3 / Mar 21, 2011 7:33am

    Sue Crocker

    26054 posts

    Hi, o_cee, there are actually two issues going on here. The first is the space in the filename and the second is the ) character. I’ve filed a bug report on your behalf.

    Thanks for pointing out the problem. We appreciate it.

  • #4 / May 17, 2011 10:52pm

    Pascal Kriete

    2589 posts

    Resolving this thread. Responded in the bug tracker, please take concerns over there.

    Thanks O_cee!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases