Explorar o código

[SCEditor] broken conversion of nonexistant bbcode with attributes (e.g. [blood width=100]) - thanks Akyhne for the report

Signed-off-by: emanuele <[email protected]>
emanuele %!s(int64=12) %!d(string=hai) anos
pai
achega
36646c2b74
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Themes/default/scripts/jquery.sceditor.bbcode.js

+ 1 - 1
Themes/default/scripts/jquery.sceditor.bbcode.js

@@ -528,7 +528,7 @@
 						if(attrs.charAt(0) === "=")
 							attrs = "defaultattr" + attrs;
 
-						if (typeof base.bbcodes[bbcode].attrs == 'function')
+						if (typeof base.bbcodes[bbcode] != 'undefined' && typeof base.bbcodes[bbcode].attrs == 'function')
 						{
 							var declaredAttrs = base.bbcodes[bbcode].attrs();
 							var attrArray = new Array;