diff --git a/public/css/style.less b/public/css/style.less index 5cb9d0b0ff..5da5d4be06 100644 --- a/public/css/style.less +++ b/public/css/style.less @@ -733,4 +733,13 @@ body .navbar .nodebb-inline-block { font-size: 12px; color: red; } +} + +#chat-content { + width:95%; + height:200px; +} + +#chat-message-input { + width:95%; } \ No newline at end of file diff --git a/public/src/app.js b/public/src/app.js index c5a2f58bc9..dbb39ecc45 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -50,6 +50,17 @@ var socket, return text.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"); } + // Willingly stolen from: http://phpjs.org/functions/strip_tags/ + app.strip_tags = function(input, allowed) { + allowed = (((allowed || "") + "").toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join(''); // making sure the allowed arg is a string containing only tags in lowercase () + var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi, + commentsAndPhpTags = /|<\?(?:php)?[\s\S]*?\?>/gi; + + return input.replace(commentsAndPhpTags, '').replace(tags, function ($0, $1) { + return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : ''; + }); + } + // use unique alert_id to have multiple alerts visible at a time, use the same alert_id to fade out the current instance // type : error, success, info, warning/notify // title = bolded title text @@ -114,6 +125,7 @@ var socket, app.open_post_window = function(post_mode, id, title, pid) { + submit_post_btn = submit_post_btn || document.getElementById('submit_post_btn'); post_title = post_title || document.getElementById('post_title'); reply_title = reply_title || document.getElementById('reply_title'); diff --git a/public/templates/admin/users.tpl b/public/templates/admin/users.tpl index 4d8df6ca3e..3f181571be 100644 --- a/public/templates/admin/users.tpl +++ b/public/templates/admin/users.tpl @@ -16,7 +16,7 @@
- +
{users.username} diff --git a/public/templates/header.tpl b/public/templates/header.tpl index 259e65ab72..7775ec55a2 100644 --- a/public/templates/header.tpl +++ b/public/templates/header.tpl @@ -9,6 +9,7 @@ + @@ -98,6 +99,18 @@
+ +
\ No newline at end of file diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index cef7b2a962..fc14592931 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -25,12 +25,12 @@

{topic_name}

- - - + + + - - + +

@@ -52,7 +52,7 @@ -
  • +
  • @@ -66,6 +66,7 @@
    {posts.signature}
    +
    @@ -82,9 +83,9 @@
    - +