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
99 stars 69 forks source link

Double quotes in a va-link (Staff Name) field are not encoded properly for the FE #18193

Open ian-sears opened 5 months ago

ian-sears commented 5 months ago

Describe the defect

When an editor uses double quotes in a Staff Profile first or last name field, this causes the name to not be displayed on the Front end

To Reproduce

Steps to reproduce the behavior: Maybe do this on a Tugboat so we don't break this again on Prod:

  1. Go to a staff profile page, for example Charles "Dave" Collins
  2. Change the single quotes to double quotes for his nickname "Dave"
  3. Save the Node.
  4. After Content Release, the page at Salisbury Health Care > Leadership displays the name as only Charles.

AC / Expected behavior

Screenshots

I will try to capture a screenshot to add to this if possible.

Additional context

srancour commented 2 months ago

Charles is no longer listed on that page. Another page to look at is Spokane Health Care Leadership with James "Shep" Speight

srancour commented 2 months ago

They changed James to "James (Shep) Speight" another leadership member is Thomas "Zach" Orr who's on the VA West Palm Beach Health Care Leadership page. It does look like the name may being populated is from the text field in the va-link element because it is in fact closing that field with the quotes for this instance.

On the Sergeant Ernest I. "Boots" Thomas VA Clinic facility it looks like the text field is escaping the quotes using &quot on the Locations page.

Staff profiles being referenced in pages other than the leadership page seem to not be using the va-link and instead are using a tags so the quotes are working there for things like Mary "Heather" Levy BSN, RN on the Charleston Healthcare Oncology Meet the Team section.

Also, when a staff profile doesn't have a biography it seems that it doesn't break as well like in the case of Robert "Robbie" Davis on the VA North Florida/South Georgia health care Patient advocates page. This is also true for leadership pages when the person doesn't have a biography like William "Billy" Irwin MD on the VA Marion health care Leadership page.