mraible opened a new pull request, #319: URL: https://github.com/apache/roller/pull/319
Before Summernote starts, `EntryEditor.jsp` checks the entry with the new `roller-ui/scripts/rich-editor-content.js`. It parses the HTML in an inert `DOMParser` document, and as `<template>` contents for stray table parts that jQuery's `html()` keeps, and looks for scripts, frames, plugins (`object`, `embed`, `applet`), document-level elements (`base`, `meta`, `link`, `style`), `noscript`, SVG `set`/`animate`, `on*` attributes, and `javascript:` or `vbscript:` URLs. If it finds any, the entry opens in the plain textarea with a notice that it contains HTML the rich editor can't show, instead of in Summernote. The entry's stored HTML is never changed, so embeds such as videos and widgets are kept, and the plain-text editor is unchanged. Media inserted while the textarea is showing goes into the textarea, since Summernote starts itself on any call. Weblogs whose editor setting names an editor that no longer exists (old `xinha` or `ekit` values) get the default rich editor, so they get this check too. Tests: `EntryEditorRichContentTest` checks that the page loads the script and starts Summernote only after the check; it fails without the change. The detection was also checked in a browser against the jQuery 4 / Summernote 0.9.1 webjars (30 cases that must open as HTML, 12 that may use the rich editor). `mvn test` passes (751 tests), and the Playwright database-login suite passes. CHANGES entries for this and the related fixes will come in one PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
