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

Prevent double encoding audio/video titles #2994

Merged
merged 2 commits into from Mar 22, 2020
Merged

Prevent double encoding audio/video titles #2994

merged 2 commits into from Mar 22, 2020

Conversation

bleistivt
Copy link
Contributor

{{video.mp4|Single quote: ' Ampersand: &}}
Audio/video files like the above will have double-encoded HTML entities showing in their title attribute.

This fixes that by removing an unnecessary _xmlEntities() call.
The title gets escaped later by _audio()/_video() which passes it through buildAttributes():

https://github.com/splitbrain/dokuwiki/blob/c22dd092c4c44d7d648d88cb32606880af5156c7/inc/parser/xhtml.php#L1871

https://github.com/splitbrain/dokuwiki/blob/246d33375d7a319f09d2b596725e38a48dd90794/inc/common.php#L376

@phy25
Copy link
Collaborator

phy25 commented Feb 29, 2020

Could you provide a testcase in the PR as well?

@bleistivt
Copy link
Contributor Author

Done.

Copy link
Collaborator

@phy25 phy25 left a comment

Choose a reason for hiding this comment

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

Nice catch, thanks!

@phy25 phy25 merged commit 237d41a into dokuwiki:master Mar 22, 2020
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.

None yet

2 participants