Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.5.1] img markup: arg separator broken .. #102

Closed
jdlx opened this issue Jan 27, 2013 · 8 comments
Closed

[2.5.1] img markup: arg separator broken .. #102

jdlx opened this issue Jan 27, 2013 · 8 comments

Comments

@jdlx
Copy link

jdlx commented Jan 27, 2013

Hi,

dunno if this is some local quirk or a real bug.. however this img markup:

!http://rexdev.de/index.php?rex_img_type=github_readme&rex_img_file=lnk_jdlx_agk_patches_structure_mediapool.png!

results in:

<p><img src="http://rexdev.de/index.php?rex_img_type=github_readme&amp;amp;rex_img_file=lnk_jdlx_agk_patches_structure_mediapool.png" alt="" /></p>

note the &amp;amp;

Can others verify? (happens in 2.4.1 as well for me.. and arg_separator.output seems not to be an issue..)

cheers,
Jan

@netcarver
Copy link
Contributor

Yes, I'm seeing this too with v2.5.1.

@netcarver
Copy link
Contributor

Jan, try commenting out this line in fImage()...

$url = htmlspecialchars($url, ENT_QUOTES, 'UTF-8');

@jdlx
Copy link
Author

jdlx commented Jan 27, 2013

Getting &amp; now..

@jdlx
Copy link
Author

jdlx commented Jan 27, 2013

I wonder if Textile should do this hardcoded replacement in urls.. i think it should do according to arg_separator.output settings.

@jdlx
Copy link
Author

jdlx commented Jan 27, 2013

Plus: the above htmlspecialchars(... code: shouldn't that rather be urlencode()?

@netcarver
Copy link
Contributor

Textile doesn't (directly) use the arg_separator.output setting. I hope to get some more time to investigate and fix this this week.

@jdlx
Copy link
Author

jdlx commented Jan 27, 2013

I'm a bit clueless where the &->$amp; replacement takes place.. a quick debugging with firephp seems to point to retrieveURLs() though i don't see how/why the preg_replace_callback there should do that.

@jdlx
Copy link
Author

jdlx commented Jan 27, 2013

Ah.. i missed it in the callback.. so it's happening here: https://github.com/netcarver/textile/blob/6caa17c9aae18a658b2b4006c9a52cfc85637d8a/classTextile.php#L2453

(Edited by netcarver to fix link to specific commit)

@gocom gocom closed this as completed in 5615197 Oct 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants