Closed Bug 1205072 Opened 9 years ago Closed 8 years ago

Markdown should not call quoteUrl() for code sections

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 6.0

People

(Reporter: altlist, Assigned: altlist)

References

Details

Attachments

(1 file, 2 obsolete files)

If I have a comment text below:

    ```
    See bug NNN
    ```

Markdown will expand "bug NNN" to the anchor text, then escape it to look like below

    See <a href=".....">bug NNN</a>

On the one hand, I think code blocks should expand ticket ids.  On the other hand, it breaks the intent of code blocks, plus could make syntax highlighting a challenge (bug 1203960).

This is with my custom Bugzilla 5.0 code based
Attached patch bug-1205072-code-blocks (obsolete) — Splinter Review
Attached is a suggestion, where I removed all fenced code blocks from the start, as opposed to doing this inline inside various sections.
Attachment #8662012 - Flags: review?(gerv)
Blocks: 1205415
Attached patch v2 (obsolete) — Splinter Review
Turns out indented code blocks exhibit the same issue, such that seems best to handle all CodeBlocks within Bugzilla.  I've updated a working patch although there must be a better way to handle this
Attachment #8662012 - Attachment is obsolete: true
Attachment #8662012 - Flags: review?(gerv)
Attachment #8662610 - Flags: review?(gerv)
Comment on attachment 8662610 [details] [diff] [review]
v2

Koosha: you wrote the Markdown support. Can you look at this patch also? :-) 

Thanks,

Gerv
Attachment #8662610 - Flags: review?(gerv) → review?(koosha.khajeh)
Attached patch v3Splinter Review
Updated patch to reflect changes done in ticket 1214310.  This also uses private code points
Attachment #8662610 - Attachment is obsolete: true
Attachment #8662610 - Flags: review?(koosha.khajeh)
Attachment #8679303 - Flags: review?(dylan)
Depends on: 1214310
Assignee: create-and-change → altlist
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 6.0
Comment on attachment 8679303 [details] [diff] [review]
v3

Looks good, and correctly fixes the problem. r=LpSolit
Attachment #8679303 - Flags: review?(dylan) → review+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   a6562e0..c9ba7ae  master -> master
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Summary: Markdown incorrectly calls quoteUrl for coded sections → Markdown should not call quoteUrl() for code sections
Blocks: 1208947
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: