From 6ce8bef70945d7ef8bcbbd9a0fa7053c41158cb9 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 13 May 2014 15:03:10 -0700 Subject: [PATCH] Drop HTML in custom board titles. This could be useful, but the fact that it's been broken almost since its creation indicates nobody's actually using it. As with the file info formatting, I'll mention it on the changelog and add it back with better security if someone actually wants to use it. --- src/Miscellaneous/Banner.coffee | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Miscellaneous/Banner.coffee b/src/Miscellaneous/Banner.coffee index fe210f018..7e8173972 100644 --- a/src/Miscellaneous/Banner.coffee +++ b/src/Miscellaneous/Banner.coffee @@ -46,12 +46,10 @@ Banner = return @blur() if !e.shiftKey and e.keyCode is 13 focus: -> - @textContent = @innerHTML - string = "#{g.BOARD}.#{@className}" string2 = "#{string}.orig" - items = {title: @innerHTML} + items = {title: @textContent} items[string] = '' items[string2] = false @@ -62,25 +60,24 @@ Banner = return blur: -> - @innerHTML = @textContent @contentEditable = false $.set "#{g.BOARD}.#{@className}", @textContent custom: (child) -> - cachedTest = child.innerHTML + cachedTest = child.textContent string = "#{g.BOARD}.#{child.className}" $.on child, 'click keydown focus blur', (e) -> Banner.cb[e.type].apply @, [e] $.get string, cachedTest, (item) -> return unless title = item[string] - return child.innerHTML = title if Conf['Persistent Custom Board Titles'] + return child.textContent = title if Conf['Persistent Custom Board Titles'] string2 = "#{string}.orig" $.get string2, cachedTest, (itemb) -> if cachedTest is itemb[string2] - child.innerHTML = title + child.textContent = title else $.set string, cachedTest $.set string2, cachedTest