reveal.js-menu icon indicating copy to clipboard operation
reveal.js-menu copied to clipboard

Mishandled HTML markup in slides' title

Open altblue opened this issue 2 years ago • 0 comments

Selected title ‒both through titleSelector and from data-menu-title‒ is considered plain text, but it's used as HTML (create()), leading to unexpected results.

Demo: https://codepen.io/altblue/pen/BaPrXbv

Looking at create() code, I see its last argument, content, being used as HTML (the innerHTML line), while all create() calls seem to feed plain text. If this impression is right, then a quick fix might be replacing innerHTML with an append() call.

OTOH, I see in the useTextContentForMissingTitles code path some HTML markup escaping code: if refactored, that might be use to prepare content on the calling create() side).

altblue avatar Jan 25 '23 13:01 altblue