Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted September 22, 2024Sep 22 In firefox, pressing enter twice does not break out of quotes. This did used to work, and still does on Chrome, although I'm not sure why it did given the code involved was last changed 4 and 10 years ago in ipsquote and ckeditor respectively. It seems to be because the regex that removes the bogus <br/> does not account for the type="_moz" attribute that is added when running in firefox. Here's a fix that seems to work for me: diff --git a/applications/core/dev/ckeditor/plugins/ipsquote/plugin.js b/applications/core/dev/ckeditor/plugins/ipsquote/plugin.js index b26116dd..9404a002 100644 --- a/applications/core/dev/ckeditor/plugins/ipsquote/plugin.js +++ b/applications/core/dev/ckeditor/plugins/ipsquote/plugin.js @@ -166,7 +166,7 @@ CKEDITOR.plugins.add( 'ipsquote', { var paragraphContent = selectedElement.getHtml(); // We are going to ignore <br> tags, but only one (if there are more than one don't ignore) - paragraphContent = paragraphContent.replace( /\<br\>/, '' ); + paragraphContent = paragraphContent.replace( /\<br( [^>]*)?\>/, '' ); // Ignore empty span tags paragraphContent = paragraphContent.replace( /\<span.*?\>\s*?\<\/span\>/g, '' ); Originally reported to me by a user.
September 23, 2024Sep 23 Community Expert Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.
September 23, 2024Sep 23 In firefox, pressing enter twice does not break out of quotes. This did used to work, and still does on Chrome, although I'm not sure why it did given the code involved was last changed 4 and 10 years ago in ipsquote and ckeditor respectively. It seems to be because the regex that removes the bogus <br/> does not account for the type="_moz" attribute that is added when running in firefox. Here's a fix that seems to work for me: diff --git a/applications/core/dev/ckeditor/plugins/ipsquote/plugin.js b/applications/core/dev/ckeditor/plugins/ipsquote/plugin.js index b26116dd..9404a002 100644 --- a/applications/core/dev/ckeditor/plugins/ipsquote/plugin.js +++ b/applications/core/dev/ckeditor/plugins/ipsquote/plugin.js @@ -166,7 +166,7 @@ CKEDITOR.plugins.add( 'ipsquote', { var paragraphContent = selectedElement.getHtml(); // We are going to ignore <br> tags, but only one (if there are more than one don't ignore) - paragraphContent = paragraphContent.replace( /\<br\>/, '' ); + paragraphContent = paragraphContent.replace( /\<br( [^>]*)?\>/, '' ); // Ignore empty span tags paragraphContent = paragraphContent.replace( /\<span.*?\>\s*?\<\/span\>/g, '' ); Originally reported to me by a user. I've been with Invision for 14 months and double-enter with FireFox has never worked for me. For this reason, I usually use Edge. It did not occur to me that there might be a fix for this. Hopefully it will be fixed again and I will add it to my site. Edited September 23, 2024Sep 23 by Como