@@ -215,7 +215,7 @@ $.extend(WYMeditor, {
215215 "section" , "article" , "aside" , "details" , "header" , "footer" ,
216216 "nav" , "dialog" , "figure" , "figcaption" , "address" , "hgroup" ,
217217 "mark" , "time" , "canvas" , "audio" , "video" , "source" , "output" ,
218- "progress" , "ruby" , "rt" , "rp" , "summary" , "command" ) ,
218+ "progress" , "ruby" , "rt" , "rp" , "summary" , "command" < %= ", #{Refinery::Core.wymeditor_whitelist_tags.keys.map{|k| %Q{" # { k } "}}.join(', ')}" if Refinery :: Core . wymeditor_whitelist_tags . any ? % > ) ,
219219
220220 KEY : {
221221 BACKSPACE : 8 ,
@@ -2161,7 +2161,7 @@ WYMeditor.XhtmlValidator = {
21612161 {
21622162 "core" :
21632163 {
2164- "except" :[
2164+ "except" :< %= [
21652165 "base" ,
21662166 "head" ,
21672167 "html" ,
@@ -2170,7 +2170,7 @@ WYMeditor.XhtmlValidator = {
21702170 "script" ,
21712171 "style" ,
21722172 "title"
2173- ] ,
2173+ ] . reject { | a | Refinery :: Core . wymeditor_whitelist_tags . keys . map ( & : to_s ) . include ? ( a ) } . inspect % > ,
21742174 "attributes" :[
21752175 "class" ,
21762176 "id" ,
@@ -2184,14 +2184,14 @@ WYMeditor.XhtmlValidator = {
21842184 } ,
21852185 "language" :
21862186 {
2187- "except" :[
2187+ "except" :< %= [
21882188 "base" ,
21892189 "br" ,
21902190 "hr" ,
21912191 "iframe" ,
21922192 "param" ,
21932193 "script"
2194- ] ,
2194+ ] . reject { | a | Refinery :: Core . wymeditor_whitelist_tags . keys . map ( & : to_s ) . include ? ( a ) } . inspect % > ,
21952195 "attributes" :
21962196 {
21972197 "dir" :[
@@ -2245,7 +2245,7 @@ WYMeditor.XhtmlValidator = {
22452245 } ,
22462246 "keyboard" :
22472247 {
2248- "except" :[
2248+ "except" :< %= [
22492249 "base" ,
22502250 "bdo" ,
22512251 "br" ,
@@ -2259,7 +2259,7 @@ WYMeditor.XhtmlValidator = {
22592259 "script" ,
22602260 "style" ,
22612261 "title"
2262- ] ,
2262+ ] . reject { | a | Refinery :: Core . wymeditor_whitelist_tags . keys . map ( & : to_s ) . include ? ( a ) } . inspect % > ,
22632263 "attributes" :[
22642264 "onkeydown" ,
22652265 "onkeypress" ,
@@ -2268,7 +2268,7 @@ WYMeditor.XhtmlValidator = {
22682268 } ,
22692269 "mouse" :
22702270 {
2271- "except" :[
2271+ "except" :< %= [
22722272 "base" ,
22732273 "bdo" ,
22742274 "br" ,
@@ -2279,7 +2279,7 @@ WYMeditor.XhtmlValidator = {
22792279 "script" ,
22802280 "style" ,
22812281 "title"
2282- ] ,
2282+ ] . reject { | a | Refinery :: Core . wymeditor_whitelist_tags . keys . map ( & : to_s ) . include ? ( a ) } . inspect % > ,
22832283 "attributes" :[
22842284 "onclick" ,
22852285 "ondblclick" ,
@@ -2800,7 +2800,8 @@ WYMeditor.XhtmlValidator = {
28002800 "62" :"rt" ,
28012801 "63" :"rp" ,
28022802 "64" :"summary" ,
2803- "65" :"command"
2803+ "65" :"command" < % Refinery ::Core . wymeditor_whitelist_tags . each do | key , value| % > ,
2804+ < %= key . inspect % > :< %= value . to_json % > < % end % >
28042805 } ,
28052806
28062807 // Temporary skipped attributes
@@ -3873,7 +3874,7 @@ WYMeditor.XhtmlSaxListener = function()
38733874 "section" , "article" , "aside" , "details" , "header" , "footer" ,
38743875 "nav" , "dialog" , "figure" , "figcaption" , "address" , "hgroup" ,
38753876 "mark" , "time" , "canvas" , "audio" , "video" , "source" , "output" ,
3876- "progress" , "ruby" , "rt" , "rp" , "summary" , "command" ] ;
3877+ "progress" , "ruby" , "rt" , "rp" , "summary" , "command" < %= ", #{Refinery::Core.wymeditor_whitelist_tags.keys.map{|k| %Q{" # { k } "}}.join(', ')}" if Refinery :: Core . wymeditor_whitelist_tags . any ? % > ] ;
38773878
38783879
38793880 // Defines self-closing tags.
0 commit comments