View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0035210 | mantisbt | ui | public | 2024-12-28 06:36 | 2025-01-23 14:31 |
| Reporter | raspopov | Assigned To | dregad | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 2.28.0 | ||||
| Target Version | 2.28.0 | Fixed in Version | 2.28.0 | ||
| Summary | 0035210: Incorrect handling of relative URLs in helper_get_root_domain() function and caller one | ||||
| Description | If you specify, for example, a relative link in an image markdown, you will get the following message:
Because of the way this function is used, it's not easy to figure out how to fix it. | ||||
| Steps To Reproduce | Insert this markdown link in the input field: | ||||
| Additional Information | Branch: master | ||||
| Tags | No tags attached. | ||||
|
Was added here: https://github.com/mantisbt/mantisbt/pull/2044 |
|
|
MantisBT: master 40f71cf3 2024-12-29 08:49 Details Diff |
Fix nofollow attribute for relative URLs Extract duplicated code in MantisMarkdown::processUrl() and the callback in string_insert_hrefs() into a new helper_is_link_external() function. Add logic to treat relative URLs as internal. Fixes 0035210 Follow-up on issue 0005271, PR https://github.com/mantisbt/mantisbt/pull/2044 |
Affected Issues 0005271, 0035210 |
|
| mod - core/helper_api.php | Diff File | ||
| mod - core/string_api.php | Diff File | ||
| mod - plugins/MantisCoreFormatting/core/MantisMarkdown.php | Diff File | ||
|
MantisBT: master 9cb002ec 2024-12-29 19:20 Details Diff |
Add tests for external URLs and nofollow - testLinkIsExternal: checks that helper_is_link_external() correctly detects external URLs. - testNoFollow: verifies that helper_get_link_attributes() sets the nofollow attribute (LINKS_NOFOLLOW_EXTERNAL) as appropriate for internal and external links. Issue 0035210 |
Affected Issues 0035210 |
|
| mod - tests/Mantis/Helper/GetLinkAttributesTest.php | Diff File | ||