-
Bug
-
Resolution: Duplicate
-
Medium
-
None
-
5.0.1
-
None
-
Windows 7, 64-bit
- Create a page containing an html/xml code block containing the following content:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> </settings>
- Save the page
- Double click on the code block, copy the contents into the clipboard.
- Paste the clipboard into an editor (I use textpad) and save to ~/.m2/settings.xml.
- Run any Maven command, causing it to use settings.xml. Maven will complain:
[FATAL] Non-parseable settings C:\.m2\settings.xml: start tag unexpected character \ua0 (position: START_DOCUMENT seen <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"\r\n\ua0... @2:2) @ C:\.m2\settings.xml, line 2, column 2
It seems that Confluence is inserting unicode characters into the clipboard (at the end of each line) which causes Maven to fail.
Expected behavior: The clipboard should contain the exact same characters that were put into the code block in the first place.
Workaround: Edit page, copy contents of code block into clipboard. Contents are now correct.
I am setting priority to critical because this issue results in data loss/corruption for the typical use-case.
Workaround:
As the No Format macro doesn't allow for double click selection, one potential solution is to disable the Code Macro (by going to Confluence Admin > Manage Add-ons > System Add-ons) and then create a user macro called something like 'code' with the template: <ac:macro ac:name="noformat"><ac:plain-text-body><![CDATA[ $body]]></ac:plain-text-body></ac:macro>, which means that whenever someone goes to create a code macro, they instead make a No Format macro.
- is duplicated by
-
CONFSERVER-24952 Mangled clipboard copy of {code} block after doubleclick
-
- Closed
-
- mentioned in
-
Page Failed to load