Skip to content

A <p>&nbsp;</p> is added after each line that contains a matched protect (regex) value #7522

Closed as not planned
@JeroenKurvink

Description

@JeroenKurvink

What is the current behavior? Describe the bug
A protect was added to ignore the in tinymce. The protect works but after each line it adds a

when switching to source code view again.

protect: [/.(<![\s\S]?-->)/g]

<!-- comment -->
<!-- comment2 -->
<!-- comment3 -->

becomes

<!-- comment -->
<p>&nbsp;</p>
<!-- comment2 -->
<p>&nbsp;</p>
<!-- comment3 -->

Please provide the steps to reproduce and if possible a minimal demo of the problem via fiddle.tiny.cloud or similar.

https://fiddle.tiny.cloud/NThaab

  1. add the following in the source code view
<!-- comment -->
<!-- comment2 -->
<!-- comment3 -->
  1. close the source code view
  2. open the source code view

What is the expected behavior?

<!-- comment -->
<!-- comment2 -->
<!-- comment3 -->

stays

<!-- comment -->
<!-- comment2 -->
<!-- comment3 -->

Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE?

Im using 5.10.2 and tested this in chrome Version 97.0.4692.71 (Official Build) (64-bit). I don't know if this worked in previous versions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions