PHP Classes

File: public/js/tinymce/src/plugins/fullpage/src/test/js/atomic/ProtectTest.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/fullpage/src/test/js/atomic/ProtectTest.js   Download  
File: public/js/tinymce/src/plugins/fullpage/src/test/js/atomic/ProtectTest.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 943 bytes
 

Contents

Class file image Download
test( 'atomic.tinymce.plugins.fullpage.ProtectTest', [ 'ephox.agar.api.Assertions', 'tinymce.plugins.fullpage.core.Protect' ], function (Assertions, Protect) { var testProtect = function () { Assertions.assertEq('', 'a<!--mce:protected b-->c', Protect.protectHtml([/b/g], 'abc')); Assertions.assertEq('', 'a<!--mce:protected b-->cde<!--mce:protected f-->', Protect.protectHtml([/b/g, /f/g], 'abcdef')); Assertions.assertEq('', 'a<!--mce:protected %3Cb%3E-->c', Protect.protectHtml([/<b>/g], 'a<b>c')); }; var testUnprotect = function () { Assertions.assertEq('', 'abc', Protect.unprotectHtml('a<!--mce:protected b-->c')); Assertions.assertEq('', 'abcdef', Protect.unprotectHtml('a<!--mce:protected b-->cde<!--mce:protected f-->')); Assertions.assertEq('', 'a<b>c', Protect.unprotectHtml('a<!--mce:protected %3Cb%3E-->c')); }; testProtect(); testUnprotect(); } );