If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Escaped (disallowed/disregarded/discarded) tags show up in the Summary textbox

VERIFIED FIXED in 5.12.6

Status

addons.mozilla.org Graveyard
Developer Pages
VERIFIED FIXED
7 years ago
2 years ago

People

(Reporter: stephend, Assigned: jbalogh)

Tracking

unspecified
5.12.6

Details

(Reporter)

Description

7 years ago
I entered:

<strong><a href="https://outgoing.stage.mozilla.com/v1/6b67db8ad813dbfa771164b450296c476772be16/http%3A//A9.com" rel="nofollow">A9.com</a></strong>Search - Web Results and Search Inside The Book into the Summary field of https://addons.allizom.org/z/en-US/developers/addon/a9-9331/edit, and it converted it at Save time to this:

&lt;strong&gt;<a href="https://outgoing.stage.mozilla.com/v1/6b67db8ad813dbfa771164b450296c476772be16/http%3A//A9.com" rel="nofollow">A9.com</a>&lt;/strong&gt; Search - Web Results and Search Inside The Book

Having escaped tags in the textbox looks weird.

Comment 1

7 years ago
Do you have a suggestion what we should do with them?
(Reporter)

Comment 2

7 years ago
(In reply to comment #1)
> Do you have a suggestion what we should do with them?

Perhaps strip them out, if they're not going to be accepted/used?  Bug 623076 might be of some help, for context.
(Assignee)

Comment 3

7 years ago
This was regressed in http://github.com/jbalogh/zamboni/commit/271ec83 for bug 623076.

(In reply to comment #1)
> Do you have a suggestion what we should do with them?

The user's text should be displayed exactly as they entered it.
This is odd, I thought the changes I made above only changed the display, but not the actual edit of the field.  Does the edit also utilize all_locales?
(Assignee)

Comment 5

7 years ago
The new code may be causing this indirectly. PurifiedFields will get their localized_string_clean set, which is then used by __unicode__. But that doesn't make sense since we do on-the-fly bleaching if we couldn't find localized_string_clean. You're right that the form field does not use all_locales.
(Assignee)

Updated

7 years ago
Assignee: nobody → jbalogh
(Assignee)

Comment 6

7 years ago
The form widget forces the right kind of translation now with http://github.com/jbalogh/zamboni/commit/a89099b, but the real fix is in http://github.com/jbalogh/zamboni/commit/0698024.

It turns out that this was a caching issue. For historical reasons the Translation model was not inheriting from amo.ModelBase so it wasn't hitting master and avoiding the cache like everything else. The good news: nobody noticed that translations were coming from cache until these objects got mixed up, so the invalidation works.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(In reply to comment #6)

> It turns out that this was a caching issue. For historical reasons the
> Translation model was not inheriting from amo.ModelBase so it wasn't hitting
> master and avoiding the cache like everything else. The good news: nobody
> noticed that translations were coming from cache until these objects got mixed
> up, so the invalidation works.

heh
(Reporter)

Comment 8

7 years ago
Verified FIXED; tags are left as-is.
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.