URLs in HTML source-text get styled as if they are links, in bugzilla comment attachment-preview block
Categories
(bugzilla.mozilla.org :: User Interface, defect)
Tracking
()
People
(Reporter: dholbert, Unassigned)
Details
Attachments
(4 files)
When obsoleting some bogus attachments from spammers today (e.g. bug 1572483 comment 9), I noticed that the attachment-preview showed up with URLs styled as links (or at least as blue) in the plaintext document.
That seems to be a mistake, perhaps? I don't think we intend to do any special styling or processing on our preview of plaintext document attachments.
| Reporter | ||
Comment 1•2 years ago
|
||
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Comment 2•2 years ago
|
||
ah, I misspoke slightly -- the spammers' attachments weren't quite plaintext -- they had mimetype text/html. Even so: it's still weird to have URLs auto-formatted as links, whether in HTML source-text or in plaintext files.
(So I've adjusted mine to have an HTML mimetype as well in an attempt to recreate the problem, though Bugzilla's not showing me a preview of the attachment inline in my bugzilla-comment right now, and that preview is the UI-in-question that I was hoping to highlight/test here.)
| Reporter | ||
Comment 3•2 years ago
|
||
Posting testcase 1 again, but with an accompanying comment this time, and with the mimetype set to text/html up-front (which may or may not matter, not sure).
| Reporter | ||
Comment 4•2 years ago
•
|
||
(I guess I don't have a way to reliably trigger this, since I don't know how to force my text/html attachments here to display an inline file-preview, which is the context in which I saw this bug earlier today...)
| Reporter | ||
Comment 5•2 years ago
|
||
Aha -- I was able to repro with https://bugzilla.mozilla.org/show_bug.cgi?id=1785884#c84 (a post from a spammer) which does currently show me an inline preview of the attachment over there.
Here's a screenshot.
| Reporter | ||
Comment 6•2 years ago
|
||
Here's a screenshot showing devtools here, which reveals that these are in fact actual links (<a href="url">) in the DOM for the bugzilla-inline-preview. This linkification is something that Bugzilla is doing automagically -- they're not actual links in the attachment itself.
(Fortunately in this case (with a spam attachment), the links aren't actually clickable, since they're all inside of a <button> for the preview-area, which (when clicked) just opens the attachment rather than visiting the link.)
Probably we don't want to generate links or do any other sort of smart-formatting here, for our previews of attachment-text?
Description
•