View Issue Details

IDProjectCategoryView StatusLast Update
4385Composrcore_comcode_pagespublic2021-03-15 18:01
Reporterjacobgkau Assigned To 
PrioritynormalSeverityminor 
Status newResolutionfixed 
Product Version10.0.31 
Summary4385: Unable to display two consecutive Hyphen-Minus characters in code boxes
DescriptionSaving a Comcode page with two Hyphen-Minus characters next to each other converts them into a single longer dash, by design. If I place two Hyphen-Minus characters next to each other within a code box, they are not replaced in the editor upon saving, but they are still displayed as a single longer dash in the rendered page, which is incorrect.

The Hyphen-Minus character is also known as:
* HTML entity: -
* UTF-8 encoding: 0x2D

I thought I was working around this issue by using the HTML entity instead of the regular character, but that workaround is not currently working, so the behavior may have changed or I may be remembering wrong. At this point, I've tried to work around this in various ways:

--texthere
--texthere
<span>-</span><span>-</span>texthere

In all of these cases, the rendered page displays a single En Dash character (\u2013) instead of the two minus characters.
Steps To ReproduceCreate a code box with two Hyphen-Minus characters followed by some other text (just two minus characters instead creates a horizontal rule):

[code]
--test
[/code]
Additional InformationThe use case for two hyphen-minus signs in a code box is displaying Bash commands, which use two hyphen-minus characters to begin long flags:

* certbot --apache
* msktutil --computer-name

While I can understand converting to an EM dash for normal text, the code box should render text exactly how it was entered.
TagsNo tags attached.
Attach Tags
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

Chris Graham

2020-09-28 21:10

administrator   ~6718

We've had a lot of subtle issues with how code tags are handled, especially when WYSIWYG is involved, and particularly with the need to apply HTML security filtering.

Fix one thing, another thing breaks.

I've been maintaining a unit test with various cases to address this.

This issue is now resolved with a major cleanup of how the code is handling code+WYSIWYG, and the test set extended to cover this specific case.

Add Note

View Status
Note
Upload Files
Maximum size: 32,768 KiB

Attach files by dragging & dropping, selecting or pasting them.
You are not logged in You are not logged in. This means you will not get any e-mail notifications. And if you reply, we will not know for sure you are the original poster of the issue.

Issue History

Date Modified Username Field Change
2020-09-27 22:03 jacobgkau New Issue
2020-09-28 21:10 Chris Graham Note Added: 0006718
2021-03-15 18:01 Chris Graham Status Not Assigned => Resolved
2021-03-15 18:01 Chris Graham Resolution open => fixed
2021-03-15 18:01 Chris Graham Description Updated