1/** 2 * NukeViet Content Management System 3 * @version 4.x 4 * @author VINADES.,JSC <[email protected]> 5 * @copyright (C) 2009-2022 VINADES.,JSC. All rights reserved 6 * @license GNU/GPL version 2 or any later version 7 * @see https://github.com/nukeviet The NukeViet CMS GitHub project 8 */ 9 10function formXSSsanitize(form) { 11 $(form).find("input, textarea").not(":submit, :reset, :image, :file, :disabled").not('[data-sanitize-ignore]').each(function() { 12 $(this).val(DOMPurify.sanitize($(this).val(), {})); 13 }); 14} 15 16$(function() { 17 $('body').on('click', '[type=submit]:not([name])', function(e) { 18 var form = $(this).parents('form'); 19 if (XSSsanitize && !$('[name=submit]', form).length) { 20 // Khi không xá» lý XSS thì trình submit mặc Äá»nh sẽ thá»±c hiá»n 21 e.preventDefault(); 22 23 // ÄÆ°a CKEditor 5 trình soạn thảo và o textarea trưá»c khi submit 24 $(form).find("textarea").each(function() { 25 if (this.dataset.editorname && window.nveditor && window.nveditor[this.dataset.editorname]) { 26 $(this).val(window.nveditor[this.dataset.editorname].getData()); 27 } 28 }); 29 30 formXSSsanitize(form); 31 $(form).submit(); 32 } 33 }); 34})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.