mirror of
https://github.com/discourse/discourse.git
synced 2026-07-30 08:08:20 -05:00
sanitize flair style
This commit is contained in:
@@ -91,10 +91,10 @@ createWidget('post-avatar-flair', {
|
||||
buildAttributes(attrs) {
|
||||
var style = '';
|
||||
if (attrs.primaryGroupFlairUrl) {
|
||||
style += 'background-image: url(' + attrs.primaryGroupFlairUrl + '); ';
|
||||
style += 'background-image: url(' + Handlebars.Utils.escapeExpression(attrs.primaryGroupFlairUrl) + '); ';
|
||||
}
|
||||
if (attrs.primaryGroupFlairBgColor) {
|
||||
style += 'background-color: #' + attrs.primaryGroupFlairBgColor + '; ';
|
||||
style += 'background-color: #' + Handlebars.Utils.escapeExpression(attrs.primaryGroupFlairBgColor) + '; ';
|
||||
}
|
||||
return {style: style};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user