Simpler dot-safe selector

This commit is contained in:
Anna Dabrowska
2022-07-04 21:41:31 +02:00
parent b188f49818
commit addb381a40

View File

@ -67,7 +67,5 @@ function formatString(format) {
* Custom onSelect handler for struct img button
*/
window.insertStructMedia = function (edid, mediaid, opts, align) {
// escape dots in field id, bureaucracy plugin uses dots and it can break jQuery selectors
edid = edid.split('.').join('\\.');
jQuery('#' + edid).val(mediaid).change();
jQuery(document.getElementById(edid)).val(mediaid).change();
};