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

Double quotes in content title - error trying to show data in relate table. #23396

Closed
EdgarPsda opened this issue Nov 18, 2022 · 3 comments · Fixed by #24637
Closed

Double quotes in content title - error trying to show data in relate table. #23396

EdgarPsda opened this issue Nov 18, 2022 · 3 comments · Fixed by #24637

Comments

@EdgarPsda
Copy link

EdgarPsda commented Nov 18, 2022

Describe the bug

A clear and concise description of what the bug is.
There's a syntax error in relate table inside the content type when the related content has double quotes in title. This causes the table doesn't shows data.
Here it is the related ticket: https://dotcms.zendesk.com/agent/tickets/109162

To Reproduce

Steps to reproduce the behavior:

  1. Create a content (page) with double quotes in title.
  2. Make sure that the content type (Blog) has a relationships field.
  3. Create a content (blog) and relate the previous content (page).
  4. Go to content (blog) details.
  5. You will see Blogs (Relate) panel empty and the error in browser console (Unexpected identifier).

Expected behavior

Show the related content in Blogs (Relate) panel.

Screenshots

Screenshot 2022-11-17 at 12 51 55 PM
Screenshot 2022-11-17 at 12 51 14 PM

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Brave
  • Version 1.44.112

Additional context

If double quotes in content title are deleted, the Blogs (Relate) panel it will shows related data.
I'm able to reproduce this issue in customer env (v22.03.3) and demo env (v22.10.1)

@EdgarPsda EdgarPsda changed the title Double quotes in content title error showing data in relate table. Double quotes in content title error, showing data in relate table. Nov 18, 2022
@EdgarPsda EdgarPsda changed the title Double quotes in content title error, showing data in relate table. Double quotes in content title - error trying to show data in relate table. Nov 18, 2022
@swicken-dotcms
Copy link
Contributor

2nd ticket regarding this: https://dotcms.zendesk.com/agent/tickets/109317

@erickgonzalez
Copy link
Contributor

erickgonzalez commented Apr 10, 2023

Note to QA:

Another customer is hitting this, with an HTML markdown.

Field type: text area
Name: title
Value:

Associate Director
<br>
RBC GAM

@erickgonzalez erickgonzalez self-assigned this Apr 14, 2023
erickgonzalez added a commit that referenced this issue Apr 14, 2023
@erickgonzalez erickgonzalez linked a pull request Apr 14, 2023 that will close this issue
erickgonzalez added a commit that referenced this issue Apr 15, 2023
erickgonzalez added a commit that referenced this issue Apr 17, 2023
* #23396 escape double quotes

* #23396 use method makeHTMLSafe
@erickgonzalez erickgonzalez reopened this Apr 17, 2023
erickgonzalez added a commit that referenced this issue Apr 17, 2023
@erickgonzalez erickgonzalez added the Release : 23.01.2 Included in LTS patch release 23.01.2 label Apr 21, 2023
erickgonzalez added a commit that referenced this issue May 4, 2023
@AndreyDotcms AndreyDotcms added the Release : 22.03.6 Included in LTS patch release 22.03.6 label May 5, 2023
@bryanboza
Copy link
Member

Fixed, tested on release-23.06 // Docker // FF

Tested with the provided steps and I'm unable to reproduce

Image

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

Successfully merging a pull request may close this issue.

7 participants