The TinyMCE setting 'Verify HTML' is ignore if unchecked as the setting value returns 0 but the TinyMCE check is === false, which returns false for 0.

Simple fix, change line #183 of tinymce.inc to:

    $settings['verify_html'] = (bool) $config['verify_html'];

Cheers,
Deciphered,

Comments

Version:6.x-2.3» 7.x-2.x-dev
Component:Code» Editor - TinyMCE
Status:Needs review» Fixed
StatusFileSize
new1005 bytes

Committed the patch below to all major branches. The -dev snapshots will be updated within 12h and this will be part of the next official releases.

Thanks!

Status:Fixed» Needs work

+++ editors/tinymce.inc
@@ -178,7 +178,7 @@ function wysiwyg_tinymce_settings($editor, $config, $theme) {
     $settings['remove_linebreaks'] = $config['remove_linebreaks'];
   }
   if (isset($config['verify_html'])) {
-    $settings['verify_html'] = $config['verify_html'];
+    $settings['verify_html'] = (bool) $config['verify_html'];

Does this only apply to verify_html and not to the other settings?

If so, we should add an inline comment, so no one mistakenly removes the (bool) in the future.

Powered by Dreditor.

Status:Needs work» Needs review
StatusFileSize
new456 bytes

What I could tell from the code, only verify_html is compared using ===, the rest just use if (setting).

+++ editors/tinymce.inc
@@ -178,6 +178,7 @@ function wysiwyg_tinymce_settings($editor, $config, $theme) {
+    // TinyMCE tests "=== false", so ensure it is a Boolean.
     $settings['verify_html'] = (bool) $config['verify_html'];

A super-tiny hint that the type-agnostic comparison (btw, calling things properly is better than code in a sentence ;)) only exists for this setting would be just lovely :)

E.g.,

"TinyMCE performs a type-agnostic comparison on this particular setting."

(or similar)

Powered by Dreditor.

I just copied the comment from CKEditor. or wherever it was from. I'm not at home now, mind taking care of it?

StatusFileSize
new1.01 KB

How about this?
Changed the CKEditor comment to match.

Status:Needs review» Fixed

Thanks for reporting, reviewing, and testing! Committed to all branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.