Warning: DOMDocument::loadHTML(): Tag nbsp invalid in Entity

Created on 23 August 2024, 3 months ago

Problem/Motivation

Warning: DOMDocument::loadHTML(): Tag nbsp invalid in Entity, line: 1 in /var/www/html/docroot/modules/contrib/strippfilter/strippfilter.module on line 29

I'm editing the issue, as I just foudn out that the nbsp module in ckEditor 5 works with a tag now, and not an html entity

Steps to reproduce

  • Install the module
  • Install the module NBSP (version 3.0.2)
  • Add text with a nbsp in a ckEditor field
  • View the content

Proposed resolution

I would expect one of the main use of this module to be for non-breaking spaces in page title with some formatting, like bold or italic. HTML entities like nbsp should be compatible.

Remaining tasks

- Find why it's happening.
- Find a solution.

πŸ’¬ Support request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada arakwar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @arakwar
  • Status changed to Closed: works as designed 3 months ago
  • πŸ‡¨πŸ‡¦Canada arakwar

    My bad.

    If you use the NBSP module, make sure its configured to process the text before you remove the P tag. So in your text editor settings, the NBSP filter has to be before the strip P filter.

  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

    Awesome, thank you for the report! It will likely help others. I was not looking forward to identifying a bug in the DOM processor!

    But it does seem like it will fail if the HTML is invalid; i wonder if there is a way to make it more robust without risk of stripping out too much.

Production build 0.71.5 2024