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

Problem with special characters in backend startpage "last edited" #360

Closed
Kahmoon opened this issue Feb 19, 2019 · 7 comments

Comments

Projects
None yet
4 participants
@Kahmoon
Copy link

commented Feb 19, 2019

Affected version(s)
4.6 & 4.7

Description
In the compare view of last edited (contao backend startpage), special characters are not shown correctly.
Jagdpraxis Teil 4 mit Nico(M-1811)

becomes

Jagdpraxis Teil 4 mit Nico (M-1811)

Greetings

@leofeyer leofeyer added the defect label Feb 23, 2019

@leofeyer leofeyer added this to the 4.4.36 milestone Feb 23, 2019

@leofeyer

This comment has been minimized.

Copy link
Member

commented Mar 18, 2019

What record did you change? A page? Or a content element?

@leofeyer leofeyer removed this from the 4.4.36 milestone Mar 18, 2019

@leofeyer leofeyer removed the defect label Mar 18, 2019

@Kahmoon

This comment has been minimized.

Copy link
Author

commented Mar 18, 2019

An event title.

greetz

@leofeyer

This comment has been minimized.

Copy link
Member

commented Mar 18, 2019

@contao/developers Strictly speaking, the diff view is correct, because ( is what has actually been stored. It seems to confuse some users though. Should we handle this? (And if yes, how do you distinct between ( and ( in the diff view then?)

@Toflar

This comment has been minimized.

Copy link
Member

commented Mar 18, 2019

Imho if decodeEntities isn't configured to true then decode the content.
The output should be encoded for security reasons again though.

@aschempp

This comment has been minimized.

Copy link
Contributor

commented Mar 18, 2019

And if yes, how do you distinct between ( and ( in the diff view then?)

That should never happen, because the field contains one or the other, right? But what if the user entered &#40?

@leofeyer

This comment has been minimized.

Copy link
Member

commented May 9, 2019

As discussed in Mumble on May 9th, we need to convert ( to ( in the diff view as suggested by @Toflar:

Imho if decodeEntities isn't configured to true then decode the content.
The output should be encoded for security reasons again though.

@leofeyer

This comment has been minimized.

Copy link
Member

commented May 13, 2019

Pull-Request: #486

@leofeyer leofeyer closed this May 13, 2019

leofeyer added a commit that referenced this issue May 15, 2019

Decode entities if the "decodeEntities" flag is not set (#486)
Description
-----------

This PR fixes #360 by decoding entities in the diff view if the `decodeEntities` flag is not set.

Commits
-------

c3d2d40 Decode entities if the "decodeEntities" flag is not set (see #360)
211026b Only decode entities after the values have been compared
fabac13 Decode entities before comparing the values and encode special characters when rendering the diff view
1dfa66c Revert the DiffRenderer changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.