-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
5.9.5, 1000.100.0, 6.4.2, 7.11.1, 7.12.0, 7.19.4, 7.19.6
-
30
-
Severity 3 - Minor
-
1
-
NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.
Summary
"Invalid white space character" error thrown when adding an image to a page which contains white space character in the title.
Steps to Reproduce
- Create a page
- Add a white space into the page title.
- For example, copy paste the content of this whitespace.txt file
- For example, copy paste the content of this whitespace.txt file
- Save the page.
- Edit the page. Add an image to this page.
Expected Results
- Image is uploaded successfully, or
- Confluence to handle more gracefully, such as provide a better explanation of this error message, or
- Have a better mechanism to prevent pages (or spaces) to be saved while there is an invalid character in the title
Actual Results
Image failed to be uploaded:
The below exception is thrown in the atlassian-confluence.log file:
2016-06-13 21:32:59,327 ERROR [http-nio-8595-exec-10] [confluence.plugins.dragdrop.UploadAction] execute Failed to save file. -- referer: http://bjorn:8595/confluence/pages/editpage.action?pageId=1769481 | url: /confluence/plugins/drag-and-drop/upload.action | userName: admin | action: upload java.lang.RuntimeException: Unexpected exception writing to stringwriter. java.io.IOException: Error while processing callback: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0xb) in text to output at com.atlassian.confluence.content.render.xhtml.Streamables.writeToString(Streamables.java:192) at com.atlassian.confluence.content.render.xhtml.DefaultEditorFormatService.convertEmbeddedImageToEdit(DefaultEditorFormatService.java:103) at com.atlassian.confluence.plugins.dragdrop.UploadAction.getHtmlToEmbedFileIntoEditorContent(UploadAction.java:220) at com.atlassian.confluence.plugins.dragdrop.UploadAction.execute(UploadAction.java:144) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168) ... Caused by: java.io.IOException: Error while processing callback: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0xb) in text to output at com.atlassian.confluence.content.render.xhtml.Streamables$XmlStreamWriterTemplateStreamable.writeTo(Streamables.java:104) at com.atlassian.confluence.content.render.xhtml.Streamables.writeToString(Streamables.java:188) ... 329 more Caused by: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0xb) in text to output at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteAttr(BaseNsStreamWriter.java:494) at com.ctc.wstx.sw.BaseNsStreamWriter.writeAttribute(BaseNsStreamWriter.java:230) at com.atlassian.confluence.content.render.xhtml.editor.embed.EditorEmbeddedImageTitleWriter.writeEmbeddedImageTag(EditorEmbeddedImageTitleWriter.java:58) at com.atlassian.confluence.content.render.xhtml.view.embed.DefaultAttachedImageResourceMarshaller.lambda$marshal$397(DefaultAttachedImageResourceMarshaller.java:126) at com.atlassian.confluence.content.render.xhtml.DefaultXmlStreamWriterTemplate.execute(DefaultXmlStreamWriterTemplate.java:36) at com.atlassian.confluence.content.render.xhtml.Streamables$XmlStreamWriterTemplateStreamable.writeTo(Streamables.java:102) ... 330 more Caused by: java.io.IOException: Invalid white space character (0xb) in text to output at com.ctc.wstx.sw.XmlWriter.throwInvalidChar(XmlWriter.java:545) at com.ctc.wstx.sw.BufferingXmlWriter.writeAttrValue(BufferingXmlWriter.java:1058) at com.ctc.wstx.sw.BufferingXmlWriter.writeAttribute(BufferingXmlWriter.java:891) at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteAttr(BaseNsStreamWriter.java:483) ... 335 more
Notes
Other scenarios on which this issue happens:
- This error message could appear while editing a page.
- When the Space Title of the space of the problematic page contains white space:
Workaround
Rename the page/space title
- relates to
-
CONFCLOUD-42851 "Invalid white space character" error thrown when adding an image to a page which contains white space character in the title
- Closed