department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
97 stars 69 forks source link

Double quotes in a Facility operating status prematurely end the text being pushed to the front end #17134

Open omahane opened 7 months ago

omahane commented 7 months ago

Describe the defect

When an editor uses double quotes in a Facility operating status, the status content saved to push is truncated at the first double quotes.

To Reproduce

Steps to reproduce the behavior:

  1. Go to the Dayton Vet Center
  2. Choose "Limited services and hours" under Operating status
  3. In the Operating status - more info add "The Dayton Vet Center will be starting renovation on January 30, 2024. Please see the "Renovations" drop down option for details on how this may impact our services."
  4. Save the node as a draft
  5. Click on the Preview button
  6. Confirm that the operating status disclosure area contains only: "The Dayton Vet Center will be starting renovation on January 30, 2024. Please see the"

AC / Expected behavior

Screenshots

Screenshot 2024-02-02 at 12 13 16 PM

Additional context

Suggested fix, per @swirtSJW, is to replace double quotes with single quotes on save.

Labels

(You can delete this section once it's complete)

Team

Please check the team(s) that will do this work.

swirtSJW commented 7 months ago

@omahane I am glad I had you make the ticket. I thought this was about the facility locator only showing part. I didn't catch that it was on our FE. That likely has to do with it being passed into the component. We should involve @eselkin and @maxx1128 on the solution here.

swirtSJW commented 7 months ago

Especially since the design system recommends the use of curly quotes https://design.va.gov/content-style-guide/punctuation#quotation-marks

swirtSJW commented 7 months ago

I confirmed that we are already handling this correctly on the LH push side of things. The quotes are being encapsulated. image

ian-sears commented 4 months ago

This also affected an Editor that attempted to double-quote a Staff profile "nickname" int he First Name field. And, as I understand it, the double-quotes also prevent screen readers from reading text that follows the 1st double-quote encountered int he text string. Just a heads-up.

But fo my example, above here, a Sample page for testing: https://prod.cms.va.gov/salisbury-health-care/about-us/leadership

Notice Charles 'Dave' Using single quotes got us by to help the editor...