medium-editor icon indicating copy to clipboard operation
medium-editor copied to clipboard

paste from word dont remove html special comments

Open MichalKrakow opened this issue 4 years ago • 0 comments

While pasting from ms word comments are not being removed.

copy paste from word

Expected behavior: [What you expected to happen] comments should be removed

Actual behavior: [What actually happened] comments are not removed

Versions

latest

// js/extensions/paste.js :63
// Microsoft Word adds some special elements around list items
            [new RegExp(/<!\[if !supportLists\]>(((?!<!).)*)<!\[endif]\>/gi), '$1']

this should include html comment tag

// Microsoft Word adds some special elements around list items
            [new RegExp(/<--!\[if !supportLists\]-->(((?!<!).)*)<--!\[endif]\-->/gi), '$1']

MichalKrakow avatar Feb 24 '20 09:02 MichalKrakow