-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
9.0.3, 9.2.3, 8.5.21
-
None
-
1
-
Severity 3 - Minor
-
Problem
When a non-breaking space character (0xA0) is present at the beginning of a CSS rule inside the HTML macro, the rule fails to apply due to invalid parsing. This issue is difficult to detect because the non-breaking space looks identical to a regular space (0x20).
Environment
Confluence DC
Steps to Reproduce
- Edit a Confluence page.
- Ensure the HTML macro is enabled, and insert it into the page.
- Paste the following content inside the macro:
<style> #main-content { border-top: solid 1px red; } </style>
- Save and publish the page. (A red line should appear at the top of the content area.)
- Edit the page again.
- Copy the line border-top: solid 1px red; without including leading spaces.
- Paste it as a new line and change border-top to border-bottom, so the block looks like this:
<style> #main-content { border-top: solid 1px red; border-bottom: solid 1px red; } </style>
- Save and publish the page.
Expected Results
Both border-top and border-bottom styles should be applied correctly.
Actual Results
Only border-top is applied.
The line with the non-breaking space (0xA0) is ignored by the browser's CSS parser and does not apply.
Workaround
- Manually delete and retype the space before the affected line using the spacebar.
- Manually copy the whole line including the leading spaces.
- Alternatively, pre-clean the content in a plain-text editor (e.g., VS Code) before pasting into the HTML macro.
Notes
- Replicate screen recording attached. leading_spaces.mov
- The non-breaking space (0xA0, encoded as 0xC2A0 in UTF-8) is not recognized as valid whitespace in CSS. It is often introduced during copy-paste from Confluence macros, code blocks, or other rich-text sources. See this bug: https://jira.atlassian.com/browse/CONFSERVER-61142