View Issue Details

IDProjectCategoryView StatusLast Update
0024612mantisbtmarkdownpublic2018-08-08 17:15
ReporterintuityAssigned Toatrol 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version2.15.0 
Target VersionFixed in Version 
Summary0024612: Markdown blockquote styling is detected as bug number and link breaks layout
Description

If you submit a bugnote using Markdown styling with a prefix of a greater than symbol '>' at the beginning of the line, it is converted into a blockquote. The blockquote contains styling of 'color:#777;' - this hex colour reference is converted into a bug link, in the middle of the blockquote's style="..." - which destroys the layout (see attached image).

My temporary workaround for this is to modify 'string_api.php' line 382 from:

    381         $p_string = preg_replace_callback(
    382                 '/(^|[^\w&])' . preg_quote( $t_tag, '/' ) . '(\d+)\b/',
    383                 $s_bug_link_callback[$p_include_anchor][$p_detail_info][$p_fqdn],
    384                 $p_string
    385         );

to become:

    381         $p_string = preg_replace_callback(
    382                 '/(^|[^\w&:])' . preg_quote( $t_tag, '/' ) . '(\d+)\b/',
    383                 $s_bug_link_callback[$p_include_anchor][$p_detail_info][$p_fqdn],
    384                 $p_string
    385         );

Adding the extra exclusion of ':' means that it won't pickup CSS attributes closely spaced to the '#' - but this obviously is not a good fix as it is vulnerable to changes, and restricts how a bug can be referred to.

TagsNo tags attached.

Activities

intuity

intuity

2018-07-16 07:45

reporter  

intuity

intuity

2018-07-16 07:46

reporter   ~0060269

Last edited: 2018-07-16 07:47

View 2 revisions

To demonstrate:

This happens!

...doesn't seem to work on this bugtracker but I can recreate it on several other installs...

atrol

atrol

2018-07-16 08:53

developer   ~0060270

The blockquote contains styling of 'color:#777;'

I thought I implemented a workaround for it https://github.com/mantisbt/mantisbt/commit/88913cb3cb2118fcdada4b5f95bd7bf40f4b155b
So this should be fixed in 2.13.2, see 0024233

I don't have time for a deeper look at the moment.
Did I miss a styling or do you don't use 2.15.0 but an older version < 2.13.2 ?

atrol

atrol

2018-07-26 07:49

developer   ~0060325

intuity,

You did not provide any feedback; I am therefore resolving this issue as "no change required".

Feel free to reopen the issue at a later time and provide the requested information.

intuity

intuity

2018-07-27 03:49

reporter   ~0060326

Apologies, I missed the email notification of your response.

I believe you're right, we have multiple installs and now I've checked I must have made an error.

atrol

atrol

2018-07-27 03:56

developer   ~0060327

Thanks for providing feedback.

Issue History

Date Modified Username Field Change
2018-07-16 07:45 intuity New Issue
2018-07-16 07:45 intuity File Added: Screenshot from 2018-07-16 12-45-46.png
2018-07-16 07:46 intuity Note Added: 0060269
2018-07-16 07:47 intuity Note Edited: 0060269 View Revisions
2018-07-16 08:53 atrol Status new => feedback
2018-07-16 08:53 atrol Note Added: 0060270
2018-07-26 07:49 atrol Assigned To => atrol
2018-07-26 07:49 atrol Status feedback => resolved
2018-07-26 07:49 atrol Resolution open => no change required
2018-07-26 07:49 atrol Note Added: 0060325
2018-07-27 03:49 intuity Note Added: 0060326
2018-07-27 03:56 atrol Note Added: 0060327
2018-08-08 17:15 atrol Status resolved => closed