pressbooks/pressbooks

String `<s/'s>` in H1 element creates strikethrough of several elements throughout the book

MichSpieler opened this issue · 3 comments

Description

A user reported seeing strikethrough in text formatting where none was applied.
image

This could be traced back to a string that appears repeatedly in a chapter: <s/'s> (in the visual editor, in the text editor displayed as &lt;s/’s&gt;). This only seems to create an issue if the string appears inside an H1 element. If the apostrophe/single quote in the string is deleted, the strikethrough effect disappears. Escaping the apostrophe/single quote (replacing it in the text editor with &39; did not resolve the problem as upon leaving the text editor, the string &39; was converted into a apostrophe/single quote '

Steps to Reproduce

  1. Create an H1 in a chapter
  2. Add the string <s/'s> to it
  3. Save and view the chapter

Expected behavior:
The string is displayed without any effect on other text in the book.

Actual behavior:
Strikethrough is applied to many elements.

Removing the apostrophe (that is not escaped in the text editor) from the string solves the problem. The apostrophe alone does not create an issue.

The user who reported this has removed the < and > characters from the H1 element as a work around.

This is the source code of the chapter's page (in my testbook). It has a <s> element before the main element. This element appears in other chapters as well.
image