0

so my question is similar to the one found here, following the example there i am trying to force Tiny MCE to encode backslashes......

currently all i am doing to test this is setting a break point on the page for the following line

tinymce.init( init );

then i run the following in the console

init.entities += ",92,#92"; init.entity_encoding = "named";

I see the values update in the init object but my \ is not converted....

not really sure what i am missing......

1 Answer 1

0

ok so finally found a solution to this. i had to edit class-wp-editor.php and include the following for the $first_init array

                'setup' => 'function(ed) 
                {                        
                    ed.onGetContent.add(function(ed, o) {
                        // Replaces all a characters with b characters
                        o.content = o.content.replace(/\\\\/g, "\");
                    });
                }',

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.