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 attribute values are double escaped in markdown #19860

Closed
jtran opened this issue May 31, 2022 · 0 comments · Fixed by #20199
Closed

HTML attribute values are double escaped in markdown #19860

jtran opened this issue May 31, 2022 · 0 comments · Fixed by #20199
Labels

Comments

@jtran
Copy link
Contributor

jtran commented May 31, 2022

Description

I expect to be able to use the double-quote character, for example, in HTML attributes by escaping it using an entity reference. However, the sanitizer double escapes entity references.

For example:

<p title="Should have double quotes: &quot;hello&quot;">See tooltip/title of this.</p>

I expect to see double-quotes in the tooltip. Instead, I see &quot;.

I reported this on the bluemonday repo, but I see no activity there, so I figured I'd bring it up here so that everyone is aware.

Relevant bluemonday issue: microcosm-cc/bluemonday#143
Reproduced here: https://try.gitea.io/developers/foobar/pulls/1#issuecomment-116871

Gitea Version

1.16.8

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker, but also try.gitea.io.

Database

PostgreSQL

@jtran jtran added the type/bug label May 31, 2022
6543 pushed a commit that referenced this issue Jul 1, 2022
The current version of bluemonday is double escaping attributes.

This PR updates bluemonday to the version that fixes this.

(See: microcosm-cc/bluemonday#143 )

Fix #19860

Signed-off-by: Andrew Thornton art27@cantab.net
zeripath added a commit to zeripath/gitea that referenced this issue Jul 3, 2022
Backport go-gitea#20199

The current version of bluemonday is double escaping attributes.

This PR updates bluemonday to the version that fixes this.

(See: microcosm-cc/bluemonday#143 )

Fix go-gitea#19860

Signed-off-by: Andrew Thornton art27@cantab.net
vsysoev pushed a commit to IntegraSDL/gitea that referenced this issue Aug 10, 2022
The current version of bluemonday is double escaping attributes.

This PR updates bluemonday to the version that fixes this.

(See: microcosm-cc/bluemonday#143 )

Fix go-gitea#19860

Signed-off-by: Andrew Thornton art27@cantab.net
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant