Review resvision page shows "<label>" and "</label>" for previous revisions

RESOLVED FIXED

Status

support.mozilla.org
Knowledge Base Software
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: pollti, Assigned: safwan)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

2 years ago
Created attachment 8702901 [details]
<label> in frontend

STR:
#Choose any kb article having more than one unreviewed revision.
#Start reviewing the newest revision.

Actual result:
<label> is shown in frontend for the older revisions, e.g.:
-----
Revision 112350 by jsavage.
<label>Revision Comment:</label> added more detail
---
(Reporter)

Comment 1

2 years ago
This has been added in https://github.com/mozilla/kitsune/pull/2462/files#diff-a2262e4d22aee4344806fd7e13e1d657R28 and https://github.com/mozilla/kitsune/pull/2462/files#diff-55b0bc21b863addd17d7c2728a162628R28.
Safwan, do you know whether this is needed for anything? Can I remove the "<label>" and "</label>" here?
Flags: needinfo?(safwan.rahman15)
(Assignee)

Comment 2

2 years ago
(In reply to Tim [:pollti] from comment #1)
> This has been added in
> https://github.com/mozilla/kitsune/pull/2462/files#diff-
> a2262e4d22aee4344806fd7e13e1d657R28 and
> https://github.com/mozilla/kitsune/pull/2462/files#diff-
> 55b0bc21b863addd17d7c2728a162628R28.
> Safwan, do you know whether this is needed for anything? Can I remove the
> "<label>" and "</label>" here?

The fact is, <label> tag was used for bolding the text. Recently, we have changed the localization tool of Kitsune, I think that raises the issue. Removing the label tag will fix it, but the true fact is, the text "Revision Comment:" will be unbold then. Need to check with the new localization tool in order to fix it.
Flags: needinfo?(safwan.rahman15)
(Assignee)

Comment 3

2 years ago
Rehan, a new issue about the changing of localization tool. Can you take a look here?
Flags: needinfo?(rdalal)
This is not an issue of changing the localization tool. You should be using |fe and not |f and you may still need to mark this as |safe.
Flags: needinfo?(rdalal)
(Assignee)

Comment 5

2 years ago
(In reply to Rehan Dalal [:rehan, :rdalal] from comment #4)
> This is not an issue of changing the localization tool. You should be using
> |fe and not |f and you may still need to mark this as |safe.

I understand. But in past, its working as expected. Dont know why its broken now!
(Reporter)

Updated

2 years ago
Assignee: pollti → nobody
Status: ASSIGNED → NEW
Technically it was "broken" in the past and now it behaves as expected.
(Assignee)

Comment 7

2 years ago
According to bug 1222040 other projects are moving from "fe" jinja2 filter. But I dont know if kitsune also moving from this filter. So as its now, it should be fixed be adding "fe" filter instead of "f" filter so the label tag will be escaped. For further information about filter, please see the bug 1222040.
(Assignee)

Comment 8

2 years ago
Created attachment 8703268 [details] [review]
Proposed Patch

PR is filled
(Assignee)

Updated

2 years ago
Assignee: nobody → safwan.rahman15
(Reporter)

Updated

2 years ago
Duplicate of this bug: 1236173
The fix for this just got pushed to production.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.