Editor title field displays differently after saving

PB 5.5.6

During entry in field (before saving):
%5D

After saving:
%5D(1)

The output should look fine. Is this causing problems functionally?

I guess it depends on your definition of functional

  • functionally yes, the rendered webpage output (e.g. Preview) is representative of the input.

  • functionally no, the display is not WYSIWYG in the editor.

The reason the title field behaves that way is because our users have requested the ability to format words in their chapter titles. We bypass WordPress defaults to allow <br>, <span>, <em>, <strong>, and <del> tags:

As a tradeoff, < and > characters that are NOT part of these tags must be saved as encoded HTML entities (&gt; and &lt;).

Since everything works, and the title field is not part of the WYSIWYG editor anyway, Iā€™m going to consider this issue resolved.

1 Like

Thank you for the detailed explanation.

Therefore to have the title in the editor view maintain the same character display before/after saving in the editor window, I only need to remove the function filter_title section in namespace.php?

That will cause an error. The best bet for you is to comment out this entire block of code in hooks-admin.php: https://github.com/pressbooks/pressbooks/blob/5dcf779ed9e7474e2c82e46ac968f43d94dcfa74/hooks-admin.php#L141-L147

1 Like