diff --git a/static/css/aowow.css b/static/css/aowow.css index 3af95628..8465fffd 100644 --- a/static/css/aowow.css +++ b/static/css/aowow.css @@ -60,6 +60,20 @@ a.open { color: white; } +img.content-image { + border-radius:2px; + margin:2px; +} + +img.content-image.content-image-shadowed { + box-shadow:0 3px 10px rgba(0, 0, 0, .35); +} + +a:hover img.content-image { + -webkit-filter:brightness(1.35); + filter:brightness(1.35); +} + img.border { border: 2px solid #404040; background-color: #080808; @@ -74,6 +88,10 @@ a:hover img.border { background-color: #101010; } +img.no-border { + border:0 !important; +} + .pad { padding-bottom: 10px; } @@ -419,6 +437,18 @@ a.revealtoggle padding-top:18px; } +.markup-float-left +{ + float:left; + margin:0 10px 10px 0; +} + +.markup-float-right +{ + float:right; + margin:10px 0 0 10px; +} + /**************************************************************/ /* CSS BELOW TO BE MOVED TO A PROPER LOCATION AND/OR REFACTOR */ /**************************************************************/ diff --git a/static/images/help/privileges/example.jpg b/static/images/help/privileges/example.jpg new file mode 100644 index 00000000..7c1e7182 Binary files /dev/null and b/static/images/help/privileges/example.jpg differ diff --git a/static/js/Markup.js b/static/js/Markup.js index 7d94054b..1196d50b 100644 --- a/static/js/Markup.js +++ b/static/js/Markup.js @@ -190,11 +190,13 @@ var Markup = { allowInReplies: true, attr: { - unnamed: { req: true, valid: /^[0-9]+$/ }, - diff: { req: false, valid: /^[0-9]+$/ }, - icon: { req: false, valid: /^false$/ }, - domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, - site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } + unnamed: { req: true, valid: /^[0-9]+$/ }, + diff: { req: false, valid: /^[0-9]+$/ }, + icon: { req: false, valid: /^false$/ }, + domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, + site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, + tempname: { req: false } + }, validate: function(attr) { @@ -209,16 +211,19 @@ var Markup = { var url = domainInfo[0]; var nameCol = domainInfo[1]; var rel = []; + var tempname = null; if(attr.diff) rel.push('diff=' + attr.diff); + if(attr.tempname) + tempname = attr.tempname; if(g_achievements[id] && g_achievements[id][nameCol]) { var ach = g_achievements[id]; return ' ' + Markup._safeHtml(ach[nameCol]) + ''; } - return '(' + LANG.types[10][0] + ' #' + id + ')'; + return '' + (tempname ? tempname : ('(' + LANG.types[10][0] + ' #' + l + ')')) + ''; }, toText: function(attr) { @@ -340,10 +345,10 @@ var Markup = { allowInReplies: true, attr: { - unnamed: { req: true, valid: /^[0-9]+$/ }, - icon: { req: false, valid: /^false$/i }, - domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, - site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } + unnamed: { req: true, valid: /^[0-9]+$/ }, + icon: { req: false, valid: /^false$/i }, + domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, + site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } }, validate: function(attr) { @@ -436,11 +441,11 @@ var Markup = { allowInReplies: true, attr: { - unnamed: { req: true, valid: /^[0-9]+$/ }, - amount: { req: false, valid: /^[0-9\:]+$/ }, - icon: { req: false, valid: /^false$/i }, - domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, - site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } + unnamed: { req: true, valid: /^[0-9]+$/ }, + amount: { req: false, valid: /^[0-9\:]+$/ }, + icon: { req: false, valid: /^false$/i }, + domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, + site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } }, allowedClass: MARKUP_CLASS_STAFF, validate: function(attr) @@ -532,12 +537,13 @@ var Markup = { itrim: true, attr: { - clear: { req: false, valid: /^(left|right|both)$/i }, + clear: { req: false, valid: /^(left|right|both)$/i }, unnamed: { req: false, valid: /^hidden$/i }, 'float': { req: false, valid: /^(left|right)$/i }, - align: { req: false, valid: /^(left|right|center)$/i }, - margin: { req: false, valid: /^\d+(px|em|\%)$/ }, - width: { req: false, valid: /^[0-9]+(px|em|\%)$/ } + align: { req: false, valid: /^(left|right|center)$/i }, + margin: { req: false, valid: /^\d+(px|em|\%)$/ }, + style: { req: false, valid: /^[^"<>]+$/ }, + width: { req: false, valid: /^[0-9]+(px|em|\%)$/ } }, allowedClass: MARKUP_CLASS_STAFF, toHtml: function(attr) @@ -552,21 +558,14 @@ var Markup = { styles.push('display: none'); if(attr.width) styles.push('width: ' + attr.width); - if(attr['float']) - { - styles.push('float: ' + attr['float']); - if(attr.margin === undefined) - { - if(attr['float'] == 'left') - styles.push('margin: 0 10px 10px 0'); - else - styles.push('margin: 0 0 10px 10px'); - } - } + if (attr['float']) + classes.push('markup-float-' + attr['float']); if(attr.align) styles.push('text-align: ' + attr.align); if(attr.margin) styles.push('margin: ' + attr.margin); + if(attr.style && Markup.allow >= Markup.CLASS_STAFF) + styles.push(attr.style) if(attr.first) classes.push('first'); if(attr.last) @@ -605,9 +604,9 @@ var Markup = { allowInReplies: true, attr: { - unnamed: { req: true, valid: /^[0-9]+$/ }, - domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, - site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } + unnamed: { req: true, valid: /^[0-9]+$/ }, + domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, + site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } }, validate: function(attr) { @@ -645,9 +644,9 @@ var Markup = { allowInReplies: true, attr: { - unnamed: { req: true, valid: /^[0-9]+$/ }, - domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, - site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } + unnamed: { req: true, valid: /^[0-9]+$/ }, + domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, + site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } }, validate: function(attr) { @@ -685,9 +684,9 @@ var Markup = { allowInReplies: true, attr: { - unnamed: { req: true, valid: /^-?[0-9]+$/ }, - domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, - site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } + unnamed: { req: true, valid: /^-?[0-9]+$/ }, + domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, + site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } }, allowedClass: MARKUP_CLASS_STAFF, validate: function(attr) @@ -727,9 +726,9 @@ var Markup = { allowInReplies: true, attr: { - unnamed: { req: true, valid: /^[0-9]+$/ }, - domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, - site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } + unnamed: { req: true, valid: /^[0-9]+$/ }, + domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, + site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } }, validate: function(attr) { @@ -809,8 +808,9 @@ var Markup = { attr: { unnamed: { req: false, valid: /^first$/i }, - clear: { req: false, valid: /^(true|both|left|right)$/i }, - toc: { req: false, valid: /^false$/i } + clear: { req: false, valid: /^(true|both|left|right)$/i }, + style: { req: false, valid: /^[^"<>]+$/ }, + toc: { req: false, valid: /^false$/i } }, toHtml: function(attr) { @@ -824,13 +824,18 @@ var Markup = { classes.push('last'); if(classes.length > 0) str += ' class="' + classes.join(' ') + '"'; + var styles = []; if(attr.clear) { if(attr.clear == 'true' || attr.clear == 'both') - str += ' style="clear: both"'; + styles.push('clear: both'); else - str += ' style="clear: ' + attr.clear + '"'; + styles.push('clear: ' + attr.clear); } + if(attr.style && Markup.allow >= Markup.CLASS_STAFF) + styles.push(attr.style); + if(styles.length) + str += ' styles="' + styles.join(';') + '"'; return [str + '>', '']; }, fromHtml: function(str) @@ -848,7 +853,8 @@ var Markup = { attr: { unnamed: { req: false, valid: /^first$/i }, - toc: { req: false, valid: /^false$/i } + style: { req: false, valid: /^[^"<>]+$/ }, + toc: { req: false, valid: /^false$/i } }, allowedClass: MARKUP_CLASS_STAFF, toHtml: function(attr) @@ -863,6 +869,11 @@ var Markup = { classes.push('last'); if(classes.length > 0) str += ' class="' + classes.join(' ') + '"'; + var styles = []; + if(attr.style && Markup.allow >= Markup.CLASS_STAFF) + styles.push(attr.style); + if(styles.length) + str += ' styles="' + styles.join(';') + '"'; return [str + '>', '']; }, fromHtml: function(str) @@ -901,13 +912,13 @@ var Markup = { itrim: true, attr: { - align: { req: false, valid: /^right$/i }, + align: { req: false, valid: /^right$/i }, 'float': { req: false, valid: /^(left|right)$/i }, - name: { req: false, valid: /\S+/ }, - size: { req: false, valid: /^(tiny|small|medium|large)$/ }, + name: { req: false, valid: /\S+/ }, + size: { req: false, valid: /^(tiny|small|medium|large)$/ }, unnamed: { req: false, valid: /^class$/i }, - url: { req: false, valid: /\S+/ }, - preset: { req: false, valid: /\S+/ } + url: { req: false, valid: /\S+/ }, + preset : { req: false, valid: /\S+/ } }, allowedClass: MARKUP_CLASS_STAFF, presets: { @@ -1022,16 +1033,17 @@ var Markup = { empty: true, attr: { - src: { req: false, valid: /\S+/ }, - icon: { req: false, valid: /\S+/ }, - id: { req: false, valid: /^[0-9]+$/ }, - blog: { req: false, valid: /^[0-9]+$/ }, - size: { req: false, valid: /^(thumb|resized|normal|large|medium|small|tiny)$/i }, - width: { req: false, valid: /^[0-9]+$/ }, - height: { req: false, valid: /^[0-9]+$/ }, + src: { req: false, valid: /\S+/ }, + icon: { req: false, valid: /\S+/ }, + id: { req: false, valid: /^[0-9]+$/ }, + blog: { req: false, valid: /^[0-9]+$/ }, + size: { req: false, valid: /^(thumb|resized|normal|large|medium|small|tiny)$/i }, + width: { req: false, valid: /^[0-9]+$/ }, + height: { req: false, valid: /^[0-9]+$/ }, 'float': { req: false, valid: /^(left|right|center)$/i }, - border: { req: false, valid: /^[0-9]+$/ }, - margin: { req: false, valid: /^[0-9]+$/ } + border: { req: false, valid: /^[0-9]+$/ }, + shadow: { req: false, valid: /^(true|false)$/ }, + margin: { req: false, valid: /^[0-9]+$/ } }, blogSize: /^(thumb|normal)$/i, idSize: /^(thumb|resized|normal)$/i, @@ -1052,6 +1064,8 @@ var Markup = { toHtml: function(attr) { var str = ''; return str; } - return '(' + LANG.types[3][0] + ' #' + id + ')'; + return '' + (tempname ? tempname : ('(' + LANG.types[3][0] + ' #' + c + ')')) + ''; }, toText: function(attr) { @@ -1198,8 +1234,8 @@ var Markup = { attr: { unnamed: { req: true, valid: /^-?[0-9]+$/ }, - domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, - site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } + domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, + site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } }, validate: function(attr) { @@ -1237,6 +1273,11 @@ var Markup = { empty: false, itrim: true, allowedParents: { ul: 1, ol: 1 }, + attr: + { + "class": { req: false, valid: /^[a-z0-9 _-]+$/i }, + style: { req: false, valid: /^[^<>]+$/ } + }, helpText: function() { var str = ''; @@ -1274,10 +1315,10 @@ var Markup = { allowedClass: MARKUP_CLASS_STAFF, attr: { - unnamed: { req: true, valid: /^(map|model|screenshot)$/ }, - zone: { req: false, valid: /^-?[0-9]+[a-z]?$/i }, - floor: { req: false, valid: /^[0-9]+$/ }, - pins: { req: false, valid: /^[0-9]+$/ } + unnamed: { req: true, valid: /^(map|model|screenshot)$/ }, + zone: { req: false, valid: /^-?[0-9]+[a-z]?$/i }, + floor: { req: false, valid: /^[0-9]+$/ }, + pins: { req: false, valid: /^[0-9]+$/ } }, validate: function(attr) { @@ -1322,7 +1363,7 @@ var Markup = { empty: false, attr: { - zone: { req: true, valid: /^-?[0-9a-z\-_]+$/i }, + zone: { req: true, valid: /^-?[0-9a-z\-_]+$/i }, source: { req: false, valid: /\S+/ } }, allowedClass: MARKUP_CLASS_STAFF, @@ -1355,10 +1396,10 @@ var Markup = { empty: false, attr: { - url: { req: false, valid: /\S+/ }, + url: { req: false, valid: /\S+/ }, type: { req: false, valid: /^[0-9]+$/ }, - x: { req: true, valid: /^[0-9]{1,2}(\.[0-9])?$/ }, - y: { req: true, valid: /^[0-9]{1,2}(\.[0-9])?$/ }, + x: { req: true, valid: /^[0-9]{1,2}(\.[0-9])?$/ }, + y: { req: true, valid: /^[0-9]{1,2}(\.[0-9])?$/ }, path: { req: false, valid: /^([0-9]{1,2}(\.[0-9])?[,:]?)+$/ } }, taglessSkip: true, @@ -1399,7 +1440,7 @@ var Markup = { empty: true, attr: { - tag: { req: false, valid: /[a-z0-9]+/i }, + tag: { req: false, valid: /[a-z0-9]+/i }, help: { req: false, valid: /^(admin|staff|premium|user|pending)$/ } }, allowedClass: MARKUP_CLASS_STAFF, @@ -1440,7 +1481,7 @@ var Markup = { rtrim: true, attr: { - tab: { req: true, valid: /^[0-9]+$/ }, + tab: { req: true, valid: /^[0-9]+$/ }, path: { req: true, valid: /\S+/ } }, allowedClass: MARKUP_CLASS_STAFF, @@ -1474,37 +1515,56 @@ var Markup = { empty: false, attr: { - item: { req: false, valid: /^[0-9]+$/ }, - object: { req: false, valid: /^[0-9]+$/ }, - npc: { req: false, valid: /^[0-9]+$/ }, - itemset: { req: false, valid: /^[0-9,]+$/ }, - slot: { req: false, valid: /^[0-9]+$/ }, + item: { req: false, valid: /^[0-9]+$/ }, + object: { req: false, valid: /^[0-9]+$/ }, + npc: { req: false, valid: /^[0-9]+$/ }, + itemset: { req: false, valid: /^[0-9,]+$/ }, + slot: { req: false, valid: /^[0-9]+$/ }, humanoid: { req: false, valid: /^1$/ }, - 'float': { req: false, valid: /^(left|right)$/i }, - img: { req: false, valid: /\S+/ }, - link: { req: false, valid: /\S+/ }, - label: { req: false, valid: /[\S ]+/ } + 'float': { req: false, valid: /^(left|right)$/i }, + border: { req: false, valid: /^[0-9]+$/ }, + shadow: { req: false, valid: /^(true|false)$/ }, + img: { req: false, valid: /\S+/ }, + link: { req: false, valid: /\S+/ }, + label: { req: false, valid: /[\S ]+/ } }, allowedClass: MARKUP_CLASS_STAFF, skipSlots: { 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 16: 1, 19: 1, 20: 1 }, toHtml: function(attr) { var str = ''; + var classes = []; + var styles = []; + + if(attr['float']) + classes.push('markup-float-' + attr['float']); + if(attr.border) + { + if(attr.border == 0) + classes.push('no-border'); + else + { + classes.push('border'); + styles.push('border-width:' + attr.border + 'px'); + } + } + else + { + classes.push('content-image'); + if(attr.shadow == 'true') + classes.push('content-image-shadowed'); + } if(attr.npc) { str = '' + Markup._safeHtml(attr._contents) + '' + Markup._safeHtml(attr._contents) + '' + Markup._safeHtml(attr._contents) + '([\s\S]*?)<\/small>/gi, '[small]$1[/small]'); } }, - sound: { + sound: + { empty: true, attr: { @@ -2386,8 +2462,10 @@ var Markup = { empty: false, attr: { - unnamed: { req: false, valid: /^(hidden|invisible)$/ }, - tooltip: { req: false, valid: /\S+/ }, + "class": { req: false, valid: /^[a-z0-9 _-]+$/i }, + style: { req: false, valid: /^[^<>]+$/ }, + unnamed: { req: false, valid: /^(hidden|invisible)$/ }, + tooltip: { req: false, valid: /\S+/ }, tooltip2: { req: false, valid: /\S+/ } }, allowedClass: MARKUP_CLASS_STAFF, @@ -2417,12 +2495,13 @@ var Markup = { allowInReplies: true, attr: { - unnamed: { req: true, valid: /^[0-9]+$/ }, - diff: { req: false, valid: /^[0-9]+$/ }, - icon: { req: false, valid: /^false$/ }, - domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, - site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, - buff: { req: false, valid: /^true$/ }, + unnamed: { req: true, valid: /^[0-9]+$/ }, + diff: { req: false, valid: /^[0-9]+$/ }, + icon: { req: false, valid: /^false$/ }, + domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, + site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, + buff: { req: false, valid: /^true$/ }, + tempname: { req: false } }, validate: function(attr) { @@ -2437,11 +2516,14 @@ var Markup = { var url = domainInfo[0]; var nameCol = domainInfo[1]; var rel = []; + var tempname = null; if(attr.buff) rel.push('buff'); if(attr.diff) rel.push('diff=' + attr.diff); + if(attr.tempname) + tempname = attr.tempname; if(g_spells[id] && g_spells[id][nameCol]) { @@ -2449,7 +2531,7 @@ var Markup = { return ' ' + Markup._safeHtml(spell[nameCol]) + ''; } - return '(' + LANG.types[6][0] + ' #' + id + ')'; + return '' + (tempname ? tempname : ('(' + LANG.types[6][0] + ' #' + f + ')')) + ''; }, toText: function(attr) { @@ -2479,10 +2561,10 @@ var Markup = { empty: true, attr: { - unnamed: { req: true, valid: /^[0-9]+$/ }, - icon: { req: false, valid: /^false$/ }, - domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, - site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } + unnamed: { req: true, valid: /^[0-9]+$/ }, + icon: { req: false, valid: /^false$/ }, + domain: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ }, + site: { req: false, valid: /^(beta|mop|ptr|www|de|es|fr|ru|pt)$/ } }, validate: function(attr) { @@ -2564,8 +2646,9 @@ var Markup = { itrim: true, allowedClass: MARKUP_CLASS_STAFF, allowedChildren: { tab: 1 }, - attr: { - name: { req: true, valid: /\S+/ }, + attr: + { + name: { req: true, valid: /\S+/ }, width: { req: false, valid: /^[0-9]+(px|em|\%)$/ } }, toHtml: function(attr) { @@ -2606,7 +2689,8 @@ var Markup = { itrim: true, allowedClass: MARKUP_CLASS_STAFF, allowedParents: { tabs: 1 }, - attr: { + attr: + { name: { req:true, valid: /[\S ]+/ }, icon: { req:false, valid: /\S+/ } }, @@ -2629,10 +2713,10 @@ var Markup = { allowedChildren: { tr: 1 }, attr: { - border: { req: false, valid: /^[0-9]+$/ }, + border: { req: false, valid: /^[0-9]+$/ }, cellspacing: { req: false, valid: /^[0-9]+$/ }, cellpadding: { req: false, valid: /^[0-9]+$/ }, - width: { req: false, valid: /^[0-9]+(px|em|\%)$/ } + width: { req: false, valid: /^[0-9]+(px|em|\%)$/ } }, toHtml: function(attr) { @@ -2703,11 +2787,11 @@ var Markup = { attr: { unnamed: { req: false, valid: /^header$/ }, - align: { req: false, valid: /^(right|left|center|justify)$/i }, - valign: { req: false, valid: /^(top|middle|bottom|baseline)$/i }, + align: { req: false, valid: /^(right|left|center|justify)$/i }, + valign: { req: false, valid: /^(top|middle|bottom|baseline)$/i }, colspan: { req: false, valid: /^[0-9]+$/ }, rowspan: { req: false, valid: /^[0-9]+$/ }, - width: { req: false, valid: /^[0-9]+(px|em|\%)$/ } + width: { req: false, valid: /^[0-9]+(px|em|\%)$/ } }, toHtml: function(attr) { @@ -2756,8 +2840,8 @@ var Markup = { count: 0, attr: { - until: { req: false, valid: /^\d+$/ }, - since: { req: false, valid: /^\d+$/ }, + until: { req: false, valid: /^\d+$/ }, + since: { req: false, valid: /^\d+$/ }, server: { req: false, valid: /^true$/ } }, validate: function(attr) @@ -2889,9 +2973,9 @@ var Markup = { attr: { unnamed: { req: false, valid: /\S+/ }, - name: { req: false, valid: /\S+/ }, - bare: { req: false, valid: /^true$/i }, - label: { req: false, valid: /[\S ]+/ } + name: { req: false, valid: /\S+/ }, + bare: { req: false, valid: /^true$/i }, + label: { req: false, valid: /[\S ]+/ } }, taglessSkip: true, allowedClass: MARKUP_CLASS_STAFF, @@ -2972,11 +3056,13 @@ var Markup = { helpText: '[url=http://www.google.com]' + LANG.markup_url + '[/url]', attr: { - unnamed: { req: false, valid: /\S+/ }, - rel: { req: false, valid: /(item|quest|spell|achievement|event|npc|object|itemset|currency)=([0-9]+)/ }, - onclick: { req: false, valid: /[\S ]+/ }, - tooltip: { req: false, valid: /\S+/ }, - tooltip2: { req: false, valid: /\S+/ } + unnamed: { req: false, valid: /\S+/ }, + rel: { req: false, valid: /(item|quest|spell|achievement|event|npc|object|itemset|currency)=([0-9]+)/ }, + onclick: { req: false, valid: /[\S ]+/ }, + style: { req: false, valid: /^[^"<>]+$/ }, + tooltip: { req: false, valid: /\S+/ }, + tooltip2: { req: false, valid: /\S+/ }, + newwindow: { req: false, valid: /^true$/ } }, validate: function(attr) { @@ -3007,7 +3093,7 @@ var Markup = { if(Markup._isUrlSafe(target, true)) { var pre = '= Markup.CLASS_STAFF) + pre += ' style="' + attr.style + '"'; pre += '>'; return [pre, '']; } @@ -3055,10 +3143,11 @@ var Markup = { empty: true, attr: { - id: { req: true, valid: /^[0-9]+$/ }, + id: { req: true, valid: /^[0-9]+$/ }, unnamed: { req: false, valid: /^embed$/i }, 'float': { req: false, valid: /^(left|right)$/i }, // Thumbnail only - border: { req: false, valid: /^[0-9]+$/ } // Thumbnail only + shadow: { req: false, valid: /^(true|false)$/ }, // Thumbnail only + border: { req: false, valid: /^[0-9]+$/ } // Thumbnail only }, ltrim: true, rtrim: true, @@ -3068,6 +3157,8 @@ var Markup = { if(g_videos[attr.id]) { var html = '', video = g_videos[attr.id]; + var classes = []; + var styles = []; if(attr.unnamed) { if(video.videoType == 1) // YouTube @@ -3080,16 +3171,29 @@ var Markup = { html += '
'; html += '