From 39f45c701c84023c695665dba456925f6481cd8f Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Wed, 15 Jun 2022 01:31:21 +0200 Subject: [PATCH] DEV: Mark inline styles as safe (#17093) Fixes many Ember deprecation warnings like: ``` WARNING: Binding style attributes may introduce cross-site scripting vulnerabilities; please ensure that values being bound are properly escaped. For more information, including how to disable this warning, see https://emberjs.com/deprecations/v1.x/#toc_binding-style-attributes. Style affected: "border-color: #33B0B0; --category-color: #33B0B0;" ``` --- .../components/categories-boxes-with-topics.hbs | 4 +++- .../app/templates/components/categories-boxes.hbs | 9 ++++++++- .../app/templates/components/parent-category-row.hbs | 7 ++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/app/templates/components/categories-boxes-with-topics.hbs b/app/assets/javascripts/discourse/app/templates/components/categories-boxes-with-topics.hbs index 0a041d8cc09..e25f0d922c1 100644 --- a/app/assets/javascripts/discourse/app/templates/components/categories-boxes-with-topics.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/categories-boxes-with-topics.hbs @@ -1,5 +1,5 @@ {{#each categories as |c|}} -
+ diff --git a/app/assets/javascripts/discourse/app/templates/components/categories-boxes.hbs b/app/assets/javascripts/discourse/app/templates/components/categories-boxes.hbs index d806ed1aafc..95758c17e50 100644 --- a/app/assets/javascripts/discourse/app/templates/components/categories-boxes.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/categories-boxes.hbs @@ -1,6 +1,7 @@ {{#each categories as |c|}} {{plugin-outlet name="category-box-before-each-box" args=(hash category=c)}} -
+ +
{{#unless c.isMuted}} {{/unless}} + + {{plugin-outlet name="category-box-after-each-box" args=(hash category=c)}} {{/each}} + {{plugin-outlet name="category-boxes-after-boxes" args=(hash category=c)}} diff --git a/app/assets/javascripts/discourse/app/templates/components/parent-category-row.hbs b/app/assets/javascripts/discourse/app/templates/components/parent-category-row.hbs index a00118be6e6..19fd656fd06 100644 --- a/app/assets/javascripts/discourse/app/templates/components/parent-category-row.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/parent-category-row.hbs @@ -1,14 +1,17 @@ {{#unless isHidden}} {{plugin-outlet name="category-list-above-each-category" args=(hash category=category)}} + - + {{category-title-link category=category}} {{plugin-outlet name="below-category-title-link" connectorTagName="div" args=(hash category=category)}} + {{#if category.description_excerpt}}
{{dir-span category.description_excerpt htmlSafe="true"}}
{{/if}} + {{#if category.isGrandParent}} @@ -25,10 +28,12 @@ {{/if}} + + {{#unless isMuted}} {{#if showTopics}}
{{html-safe category.stat}}
{{category-unread category=category tagName="div" class="unread-new"}}