Closed Bug 436790 Opened 17 years ago Closed 16 years ago

"Get add-ons" should replace newlines in description with space

Categories

(addons.mozilla.org Graveyard :: API, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gidsgoldberg, Unassigned)

Details

Attachments

(3 obsolete files)

The 'get add-ons' window doesn't do a good job handling <br> tags. It appears to strip them out, which can lead to words running together in the add-on description. I found this issue with a recommended (at the time of writing) add-on 'Taboo' Steps to reproduce: ------------------- Tools > Add-ons > Get addons Search for 'taboo' Actual result ------------- Description begins: 'The cure for tabitisIf you keep tons of tabs open' Expected Result --------------- <br> tag from description (https://addons.mozilla.org/en-US/firefox/addon/5756) is replaced with a space or other character which prevents the words running together.
Changing to AMO API, as that may be where this can be fixed.
Severity: trivial → minor
Status: UNCONFIRMED → NEW
Component: Extension/Theme Manager → API
Ever confirmed: true
Product: Firefox → addons.mozilla.org
QA Contact: extension.manager → api
Hardware: PC → All
Summary: Add-ons window should replace <br> tag in description with space → "Get add-ons" should replace newlines in description with space
Version: 3.0 Branch → unspecified
The API removes linebreaks from the summary, description and eula. They should be kept or should be replaced with white spaces. https://services.addons.mozilla.org/en-US/firefox/api/1.1/addon/5756
Attached patch patch (obsolete) — Splinter Review
This patch keeps linebreaks as-is in the API. * These linebreaks will look like spaces on the Add-ons Manager. * This allows API users to replace these linebreaks with <br /> themselves.
Attachment #372060 - Flags: review?(clouserw)
Attached patch patch (obsolete) — Splinter Review
oops
Attachment #372060 - Attachment is obsolete: true
Attachment #372062 - Flags: review?(clouserw)
Attachment #372060 - Flags: review?(clouserw)
Attachment #372062 - Flags: review?(laura)
The patch doesn't change anything when I test it
Comment on attachment 372062 [details] [diff] [review] patch I know nothing about the API, but just by looking at this I ask: Shouldn't $sanitize_replacements get " " as a replacement for something instead of "", an empty string?
From the bug title, I was thinking the same thing. It's probably a typo.
Tested again and found that these linebreaks *didn't* look like spaces on the Add-ons Manager. Seems like I made an error. So the $sanitize_replacements should replace \cJ (\n) and \cM (\r) with a space + a linebreak. Just replacing with a space will resolve the initially reported problem (summaries on the Get Add-ons window), but there are still problems: 1) The EULA dialog on the Add-ons Window. Search Aero Fox and hit Add to Firefox button to see the dialog. Linebreaks are stripped by API. https://addons.mozilla.org/ja/firefox/addons/policy/0/6070/39291 https://services.addons.mozilla.org/en-US/firefox/api/1.1/addon/6070 2) Sites/services which use the API. We (Mozilla Japan) use the API for addons.mozilla.jp and have the problem. Please see the example of Minimap Sidebar: https://addons.mozilla.org/en-US/firefox/addon/5203 https://services.addons.mozilla.org/en-US/firefox/api/1.1/addon/5203 https://addons.mozilla.jp/firefox/details/5203 I mean, linebreaks should be left as-is...
Attachment #372062 - Attachment is obsolete: true
Attachment #372062 - Flags: review?(laura)
Attachment #372062 - Flags: review?(clouserw)
This appears to already be fixed (e.g. https://preview.addons.mozilla.org/en-US/firefox/api/1.1/addon/5203 ). Only I didn't do anything. It turns out services.addons.mozilla.org is over 5000 revisions behind what is in trunk right now and a lot of this code has changed. It all needs to be reviewed though (why haven't people been complaining about features that don't show up?) and that's going to take some time.
Attachment #372632 - Attachment is obsolete: true
Understood. We'll wait for the deployment of the changes...
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: