Notifications
Clear all

[Solved] Formatting messing with comment tagging

7 Posts
2 Users
0 Reactions
120 Views
Posts: 4
Topic starter
(@accelera)
Active Member
Joined: 3 weeks ago
[#14646]

Hi guys,

I'm writing on behalf of my client (@will).

I think we've found out a bug.

If we try to mention a comment like this (#2303788) and we also format it, with bold text for example, it will not link to the comment. In short:

#2303788 <-- will work

#2303788 <-- will not work

Let me know if you need any more info.


6 Replies
Astghik
Posts: 6701
Admin
(@astgh)
Illustrious Member
Joined: 9 years ago

Hi @accelera,

This is not an issue. The HTML for the #164 in bold is <strong>#164</strong>, which is not considered the same as the main comment content.

However, if the HTML is structured like this: <strong>test #164 test</strong>, where the comment ID has spaces before and after it, it will be considered the same as #164. This works as intended because the regular expression can correctly identify and extract the comment ID from the content.

If you would like to display comment IDs in bold, we recommend using CSS instead of adding HTML tags directly to the comment content.

 


Posts: 4
Topic starter
(@accelera)
Active Member
Joined: 3 weeks ago

Hi Astghik,

Thanks for your reply.

Sorry if it's still not clear to me, but what would be the explanation for this user's insight then?


3 Replies
Astghik
Admin
(@astgh)
Joined: 9 years ago

Illustrious Member
Posts: 6701

@accelera

Could you please provide the direct URL to the comment? I’m unable to clearly understand the issue from the screenshot alone.


(@accelera)
Joined: 3 weeks ago

Active Member
Posts: 4
Astghik
Admin
(@astgh)
Joined: 9 years ago

Illustrious Member
Posts: 6701

@accelera,

Please take a look at the image. In the first and second comments, #2345721 has no spaces or HTML tags around it. However, in the third comment, the numbers and the # sign are wrapped in a <span> tag.

Because of this difference in the HTML structure, the parsing does not work the same way in both cases.

image

Posts: 4
Topic starter
(@accelera)
Active Member
Joined: 3 weeks ago

All right, thank you.


Share:
Scroll to top