Fixed list sanitizing
authorAlexander Ebert <ebert@woltlab.com>
Sun, 15 Feb 2015 13:40:00 +0000 (14:40 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 15 Feb 2015 13:40:00 +0000 (14:40 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index 95d12408bfe6fae6764c3c2a216dad6c1307e111..ea6c0bef11787077d7548067064ce4e571d7d20e 100644 (file)
@@ -835,7 +835,7 @@ RedactorPlugins.wbbcode = function() {
                        }
                        
                        // search for [*] not followed by [/list]
-                       var $lastList = data.indexOf('[/list]');
+                       var $lastList = data.lastIndexOf('[/list]');
                        if ($lastList === -1) {
                                // drop all [list*] and [*]
                                data = data.replace(/\[\*\]/g, '');