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

GridField Print view double escapes data #9389

Open
maxime-rainville opened this issue Jan 28, 2020 · 2 comments
Open

GridField Print view double escapes data #9389

maxime-rainville opened this issue Jan 28, 2020 · 2 comments

Comments

@maxime-rainville
Copy link
Contributor

Affected Version

Tested on 4.6, but presumably the entire 4 branch is affected

Description

If your GridField summary view contains data with special characters and you hit the print button, those special characters will be double escape in the print view. e.g.: If your grid field contains the string "love > hate", the actual raw HTML sent to browser will be:

image

<td>Love &amp;gt; Hate</td>

Which will appear as "Love &gt; Hate".

Steps to Reproduce

  • On a project with frameworktest installed, access the test modal admin.
  • Edit a company and add some "greater than" signs at the start of it's name.
  • Save your changes and return to the main ModelAdmin view.
  • Hit the Print button

Expected results: The new Company name is displayed with the "greater than" signs properly escape.

Actual results: The "greater than" signs are double escaped.

@robbieaverill
Copy link
Contributor

Upstream issue in userforms: silverstripe/silverstripe-userforms#633

Since this looks like a core bug it's worth checking when this is fixed that it doesn't affect the userforms equivalent bug, or patch it again if it does.

@Cheddam
Copy link
Member

Cheddam commented Jan 30, 2020

Marking this as type/UX, because it affects the behaviour of a feature used by CMS authors and will be causing them additional effort to work around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants