thexerteproject / xerteonlinetoolkits

Xerte Online Toolkits
www.xerte.org.uk
Apache License 2.0
62 stars 61 forks source link

When setting a style to part of a (section) title in the bootstrap causes an error and the whole section invisible #1166

Closed torinfo closed 1 year ago

torinfo commented 1 year ago

Changing the style of part of a title causes a crash in jQuery. Probably introduced when upgrading jQuery.

Suppose title is 'Title with part in italics'

This is put into a variable and than an attempt is done to create a jQuery object of it by $(var). But this crashes.

The fix is easy. Add the var to a div, do all the coirrections you want to do, and extract the innerHtml.