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

fix whitespace encoding in urls #3719

Merged
merged 5 commits into from
Oct 24, 2023
Merged

fix whitespace encoding in urls #3719

merged 5 commits into from
Oct 24, 2023

Conversation

dirkjf
Copy link
Contributor

@dirkjf dirkjf commented May 18, 2023

Keep encoded links encoded. With this PR markdown like this:

![internal](image%20wtih%20spaces.jpeg)
![exernal](https://examle.com/image%20wtih%20spaces.jpeg)

Will result in:

<img src="image%20wtih%20spaces.jpeg" alt="internal">
<img src="https://examle.com/image%20wtih%20spaces.jpeg" alt="exernal">

Instead of not:

<img src="image wtih spaces.jpeg" alt="internal">
<img src="https://examle.com/image wtih spaces.jpeg" alt="exernal">

See also issue #1622

Copy link
Member

@rhukster rhukster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without even running any tests, I know this will be an issue because you've removed an important bit of logic.

system/src/Grav/Common/Page/Markdown/Excerpts.php Outdated Show resolved Hide resolved
@dirkjf dirkjf changed the title fix broken src url encoding fix whitespace encoding in urls May 19, 2023
@dirkjf
Copy link
Contributor Author

dirkjf commented May 19, 2023

Without even running any tests, I know this will be an issue because you've removed an important bit of logic.

This is restored and currently this PR will only encode whitespaces in a URL.

@rhukster rhukster merged commit 6a9b1f2 into getgrav:develop Oct 24, 2023
w00fz added a commit that referenced this pull request Oct 28, 2023
w00fz added a commit that referenced this pull request Oct 28, 2023
* Revert "fix whitespace encoding in urls (#3719)"

This reverts commit 6a9b1f2.

* Revert change
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

Successfully merging this pull request may close these issues.

2 participants