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

HTML Special Characters (Decode) Querystrings #55

Closed
ozh opened this issue Apr 6, 2013 · 0 comments
Closed

HTML Special Characters (Decode) Querystrings #55

ozh opened this issue Apr 6, 2013 · 0 comments

Comments

@ozh
Copy link
Member

ozh commented Apr 6, 2013

This is a COPY of Issue 55: HTML Special Characters (Decode) Querystrings, filed on Google Code before the project was moved on Github.

Please review the original issue and especially its comments. Comments here on closed issues will be ignored. Thanks.

Original description

**- Please be as accurate as possible**
**- Using understandable English helps**
**- No answer or support if setup is older than latest release**

**What steps will reproduce the problem?**
1. Add a Link that contains multiple query string vars, ie. .com/?a=1&b=2
2. When clicking the shortened url the & is output as &amp so the link is
broken

**What is the expected output? What do you see instead?**
The & output as & instead of &amp

**Please write in your current versions of YOURLS, PHP, OS, Browser if**
**applicable, etc...**


**Please provide any additional information below.**

I fixed this issue by editing yourls.go.php line #21, replace:

$url = stripslashes($db->get_var("SELECT `url` FROM `$table` WHERE id = $id"));

with:

$url = htmlspecialchars_decode(stripslashes($db->get_var("SELECT `url` FROM
`$table` WHERE id = $id")));
@ozh ozh closed this as completed Apr 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant