Skip to content

Commit

Permalink
[#33857] escape non-breaking space characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Kharonus authored and oliverguenther committed Feb 27, 2024
1 parent e0009c1 commit e8ef656
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commonmark/commonmarkdataprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ export default class CommonMarkDataProcessor {
replacement: ( _content, node ) => node.outerHTML,
});

return turndownService.turndown( domFragment );
let turndown = turndownService.turndown( domFragment );
// Escape non-breaking space characters
return turndown.replace(/\u00A0/, ' ');
}
}

0 comments on commit e8ef656

Please sign in to comment.