Copy and pasting fragments injecting NULL characters in applet
Oxygen general issues.
-
- Posts: 45
- Joined: Wed May 23, 2012 11:20 am
Copy and pasting fragments injecting NULL characters in applet
I've come across an issue whereby the Author is selecting a mixture of text and the full element and pasting it into a new paragraph. An example of the selection is
When the Author then pastes this into another paragraph it is displayed in the Author applet as
.
We are using a DocumentFilter to make sure the paste doesn't have more than 2000 characters but if it doesn't we are passing it on to the AuthorDocumentFilterBypass to insert the fragment.
Do you have any suggestions as to why the paste is failing?
Code: Select all
Paragraph text <citation>Enter citation here</citation>
Code: Select all
<citation/>aragraph text Enter citation here
We are using a DocumentFilter to make sure the paste doesn't have more than 2000 characters but if it doesn't we are passing it on to the AuthorDocumentFilterBypass to insert the fragment.
Code: Select all
if (paraText.length() + size <= CHARACTER_LENGTH) {
bypass.insertFragment(offset, fragment);
} else {
access.getWorkspaceAccess().showInformationMessage("Unable to insert fragment into para because the fragment would breach " + CHARACTER_LENGTH + " character threshold.");
}
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Copy and pasting fragments injecting NULL characters in applet
Hi Neil,
So the user copies from the component some content and then pastes it back in another place.
Does this happen on the first or on subsequent paste operations?
By NULL characters do you mean characters which have the integer value as 0?
Maybe you have another customization which influences this behavior. Do you alter the AuthorDocumentFragment in any way? Maybe you could send me some of your customization code to support@oxygenxml.com
Could you try to reproduce the situation with one of our demo DITA samples?
http://www.oxygenxml.com/demo/AuthorDem ... ments.html
Rgards,
Radu
So the user copies from the component some content and then pastes it back in another place.
Does this happen on the first or on subsequent paste operations?
By NULL characters do you mean characters which have the integer value as 0?
Maybe you have another customization which influences this behavior. Do you alter the AuthorDocumentFragment in any way? Maybe you could send me some of your customization code to support@oxygenxml.com
Could you try to reproduce the situation with one of our demo DITA samples?
http://www.oxygenxml.com/demo/AuthorDem ... ments.html
Rgards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 45
- Joined: Wed May 23, 2012 11:20 am
Re: Copy and pasting fragments injecting NULL characters in applet
Thanks Radu,
I'm changing the Content object underneath the AuthorDocumentFragment and replacing non ASCII characters that are pasted from Word (i.e Left and Right double quotes).
I'm changing the Content object underneath the AuthorDocumentFragment and replacing non ASCII characters that are pasted from Word (i.e Left and Right double quotes).
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Copy and pasting fragments injecting NULL characters in applet
Hi Neil,
You could try to disable that code and see if it fixes the problem.
If the problem is in the code, maybe you could send me or post some fragments from it, maybe I can give you a better way to perform the replace.
Regards,
Radu
You could try to disable that code and see if it fixes the problem.
If the problem is in the code, maybe you could send me or post some fragments from it, maybe I can give you a better way to perform the replace.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service