We have a <gcse:search linktarget="_self"> </gcse:search> HTML snippet for Google search along with a gcse:search,gcse:searchbox-only config set for valid extended elements. This was working fine in JCE Core 2.7.17 but now fails with 2.8.11.
Configure JCE 2.8.11 with gcse:searchbox-only,gcse:search extended valid element
Edit an article, press "Save" or switch editor pane (code, preview)
Buttons don't work due to JS error:
Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Element': 'optgroup,select,datalist,option,isindex,menu,noscript,dd,dt,dl,caption,ul,ol,li,td,tr,th,tfoot,thead,tbody,table,hr,optgroup,select,datalist,option,isindex,menu,noscript,dd,dt,dl,caption,ul,ol,li,td,tr,th,tfoot,thead,tbody,table,hr,figure,nav,aside,hgroup,section,article,footer,header,fieldset,dir,center,blockquote,form,pre,address,div,p,h6,h5,h4,h3,h2,h1,figure,nav,aside,hgroup,section,article,footer,header,fieldset,dir,center,blockquote,form,pre,address,div,p,h6,h5,h4,h3,h2,h1,gcse:searchboxonly,gcse:searchboxonly,gcse:search,gcse:search,mce-comment,mce-comment' is not a valid selector.
querySelectorAll() should get called with gcse\\:searchbox-only,gce\\:search (notice how it also stripped the dash). It needs a \\ before the colon.
Tried using gcse\\:searchbox-only,gcse\\:search config instead but still doesn't work, something is filtering these escapes. I checked and the JSON config in the database is fine, filtering seems to happen client-side.
For now, as a work around, we just removed these from the extended elements config as we use this tag in a single content element that should never get edited. We'll use another editor if we need to fix it.
We have a
<gcse:search linktarget="_self"> </gcse:search>
HTML snippet for Google search along with agcse:search,gcse:searchbox-only
config set for valid extended elements. This was working fine in JCE Core 2.7.17 but now fails with 2.8.11.This is what was recommend in this JCE Forum post
Steps to reproduce the behavior:
gcse:searchbox-only,gcse:search
extended valid elementquerySelectorAll()
should get called withgcse\\:searchbox-only,gce\\:search
(notice how it also stripped the dash). It needs a\\
before the colon.Tried using
gcse\\:searchbox-only,gcse\\:search
config instead but still doesn't work, something is filtering these escapes. I checked and the JSON config in the database is fine, filtering seems to happen client-side.Environment