View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0034389 | mantisbt | markdown | public | 2024-04-02 17:20 | 2026-10-08 05:34 |
| Reporter | dregad | Assigned To | community | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | assigned | Resolution | open | ||
| Target Version | 2.29.0 | ||||
| Summary | 0034389: Broken rendering of links in <a href=... links when markdown is enabled | ||||
| Description | Following merge of PR 1976 to fix 0034040,
<a href="https://example.com">Link</a> Following analysis by @hotzeplotz this is likely caused by a bug in Parsedown. | ||||
| Additional Information | See original discussion in PR 1976 | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
|
Caused by the regex used by the inlineUrl method. https://github.com/erusev/parsedown/blob/1ff038273949df7d6a455352659a878f3c89b29c/Parsedown.php#L1540
The regex fail is the boundery Fail: https://regex101.com/r/kabj3Q/1 Possible fixhttps://regex101.com/r/5h5eLe/1
It is possible that the other regular expressions for the links also have such a problem … just uncovered. |
|
|
side note, the textarea needs a nice monospace font, to enable the reporter to place some markings to the right position :-) |
|
|
|
|
|
Hello Damien, I am sorry for being so silent for so long. Other issues in my life need my attention. I gave my word that I would take responsibility for this part, and that still stands. You can ping me on any reated issue, such as 0036438. Do we still want the result of https://regex101.com/r/5h5eLe/1 (screenshot above |
|
Hello, no worries - trust me I know what it's like...
Yes, I believe this is the correct rendering. |
|
|
My name is Stefan :) |
|
|
Well met Stefan :-) Thanks for the PR. Since this bug is reproducible in plain Parsedown if Safe Mode or Escape Markup are enabled (of course URL links must be ON as well), independently from your proposed patch as demonstrated by the code snippet below, I think I'll report it upstream too, so when it's fixed we can remove the override of inlineUrl() method. |
|