The helper function _weblinks_checker_fix_url in weblinks_checker module uses the parse_url php function.

With URLs that have a # character in the path, like:
http://play.cuatro.com/on-line/#/21-dias/ver/21-dias-en-la-mina

the parse_url function assigns to ["fragment"] element of the array returned by the function: /21-dias/ver/21-dias-en-la-mina

and the url saved by weblinks is chopped to: http://play.cuatro.com/on-line losing the rest of the path.

Is there any way to avoid that?

Thanks

Comments

nancydru’s picture

At the moment the only thing that comes to mind is to encode the "#" ().

miguel_angel’s picture

Hi.

I've tried to encode de '#' into the URL:

http://play.cuatro.com/on-line//21-dias/ver/21-dias-en-la-mina

or

http://play.cuatro.com/on-line/%23/21-dias/ver/21-dias-en-la-mina

but it doesn't work.

The browser doesn't decode the %23 and the result is a page not found error.

If I write:

http://play.cuatro.com/on-line/%40/21-dias/ver/21-dias-en-la-mina

The browser decodes the %40 to 'A' correctly. I don't know why it refuses to decode the %23 to '#'.

I think that the first way (encoding with ) will have the same parsing problems due to the existence of the '#' character.