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

[Bug Fix] - Markdown Processing for Telephone Links #2235

Merged
merged 2 commits into from
Nov 3, 2018
Merged

[Bug Fix] - Markdown Processing for Telephone Links #2235

merged 2 commits into from
Nov 3, 2018

Conversation

ScottHamper
Copy link
Contributor

Hey All,

Telephone link URLs use the + character to specify a globally unique number. However, when Grav parses a markdown telephone link, it replaces any + characters with spaces.

For example, [Call us](tel:+15551231234) becomes <a href="tel: 15551231234">Call us</a>

This replacement is happening because inlineLink in ParsedownGravTrait calls processLinkExcerpt, which then uses urldecode on the href attribute - urldecode replaces all + characters with spaces.

This pull request attempts to solve the issue by simply changing the call to urldecode to rawurldecode. rawurldecode works the same as urldecode, except that it does not replace + characters.

Merge recent upstream changes
Telephone links use the `+` character to specify a country code, but Grav was replacing the `+` with a space character.
@rhukster rhukster merged commit e7d6601 into getgrav:develop Nov 3, 2018
@rhukster
Copy link
Member

rhukster commented Nov 3, 2018

thanks

@ScottHamper ScottHamper deleted the bug-fix/telephone-markdown-links branch November 5, 2018 18:34
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