Skip to content

Commit 050bd02

Browse files
authored
Merge pull request #7338 from akatsoulas/question-details-parser
Use limited parser for question details
2 parents dd933f7 + e4c8129 commit 050bd02

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

kitsune/flagit/jinja2/flagit/includes/flagged_profile.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<h3 class="sumo-page-intro">{{ _('Content:') }}</h3>
33
<div class="content">
44
<h2 class="sumo-page-subheading">{{ object.content_object }}</h2>
5-
{{ object.content_object.bio|wiki_to_html(nofollow=True) }}
5+
{{ object.content_object.bio|wiki_to_safe_html(nofollow=True) }}
66
</div>
77
<h3 class="sumo-page-intro">{{ _('Flagged:') }}</h3>
88
<p class="flagged">

kitsune/gallery/jinja2/gallery/media.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ <h1 class="sumo-page-heading">{{ media.title|truncate(length=55, killwords=True)
7575
</div>
7676

7777
<h2 class="sumo-page-subheading">{{ _('Description') }}</h2>
78-
<div class="description">{{ media.description|wiki_to_html }}</div>
78+
<div class="description">{{ media.description|wiki_to_html_questions }}</div>
7979

8080
{% if media_type == 'image' %}
8181
<h2 class="sumo-page-subheading">{{ _('Articles') }}</h2>

kitsune/messages/models.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@
77

88
ALLOWED_MESSAGE_ATTRIBUTES = {
99
"a": ["href", "title", "rel", "data-mozilla-ui-reset", "data-mozilla-ui-preferences"],
10-
"div": ["id", "data-for", "title", "data-target", "data-modal"],
11-
"h1": ["id"],
12-
"h2": ["id"],
13-
"h3": ["id"],
14-
"h4": ["id"],
15-
"h5": ["id"],
16-
"h6": ["id"],
10+
"div": ["data-for", "title"],
1711
"span": ["data-for"],
1812
"img": ["src", "data-original-src", "alt", "title", "height", "width"],
1913
"video": [

kitsune/questions/jinja2/questions/question_details.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ <h3 class="sumo-card-heading">{{ started_label }}</h3>
533533
{% if question.metadata.plugins %}
534534
<h3 class="sumo-card-heading">{{ plugins_label }}</h3>
535535
<p><span class="plugins">
536-
{{ question.metadata.plugins|wiki_to_html }}
536+
{{ question.metadata.plugins|wiki_to_html_questions }}
537537
</span></p>
538538
{% endif %}
539539
{{ troubleshooting_info(question) }}

0 commit comments

Comments
 (0)