Replacing characters in an "ask" editor variable
Post here questions and problems related to oXygen frameworks/document types.
Replacing characters in an "ask" editor variable
Hi!
Were using the editor variable in our framwork (for Author 14.2)
to offer our users the possibility to inserts links in documents. Sometimes the URLs contains the character "&". If this is the case, the functions prohibit the insertion (due to XML rules). It would be nice if the function could replacing "&" with "&" (and other possible problematic characters) to allow such actions. Is this possible?
Thx & Greets,
Stefan
PS: It seems, that with the type "generic" Oxygen checks also the insertion of non-valid characters.
Were using the editor variable in our framwork (for Author 14.2)
Code: Select all
${ask('Input URL', url, '')}
Thx & Greets,
Stefan
PS: It seems, that with the type "generic" Oxygen checks also the insertion of non-valid characters.
Re: Replacing characters in an "ask" editor variable
Hi Stefan,
I think you are right, I added an improvement request to our issues list to XML-escape the URL's value when the $ask editor variable is used from a code template or as a parameter to an AuthorOperation. You are using it as a parameter passed to an Author Operation, right?
As a workaround of course you can implement your own Author Operation and show your own Java Swing-based dialog to the user, then use our API to insert the value.
About this remark:
you would also want the inserted characters to be automatically XML-escaped?
Regards,
Radu
I think you are right, I added an improvement request to our issues list to XML-escape the URL's value when the $ask editor variable is used from a code template or as a parameter to an AuthorOperation. You are using it as a parameter passed to an Author Operation, right?
As a workaround of course you can implement your own Author Operation and show your own Java Swing-based dialog to the user, then use our API to insert the value.
About this remark:
Do you mean that when you use something like:It seems, that with the type "generic" Oxygen checks also the insertion of non-valid characters.
Code: Select all
${ask('Input text', '')}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Replacing characters in an "ask" editor variable
Hi Radu,
thx for adding the feature request! That would be great!
And you're right: we're using it as parameter passed to an Author Operation (SourroundWithFragment). At the moment I think, that all content in ask-Variables should be escaped, because it has to due to XML rules ... or is there any counter-argument?
Thx & kind regards,
Stefan
thx for adding the feature request! That would be great!
And you're right: we're using it as parameter passed to an Author Operation (SourroundWithFragment). At the moment I think, that all content in ask-Variables should be escaped, because it has to due to XML rules ... or is there any counter-argument?
Thx & kind regards,
Stefan
Re: Replacing characters in an "ask" editor variable
Hi Stefan,
We'll consider this, I assume that most of the times you use the $ask to request a value for a certain attribute, right?
Regards,
Radu
We'll consider this, I assume that most of the times you use the $ask to request a value for a certain attribute, right?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Replacing characters in an "ask" editor variable
Hi Radu,
sorry for the late reply - I was in holiday for the last two weeks.
And, yes, that's right: we use it most of the times for attribute values.
I've seen your update changelog from yesterday:
Greets,
Stefan
sorry for the late reply - I was in holiday for the last two weeks.
And, yes, that's right: we use it most of the times for attribute values.
I've seen your update changelog from yesterday:
Do you have already solve this issue with the last update?Author/Form Controls: Entering XML reserved characters (&, <) in a form control that is editing the value of an attribute, would result in an invalid XML document.
Greets,
Stefan
-
- Posts: 1008
- Joined: Wed Nov 16, 2005 11:11 am
Re: Replacing characters in an "ask" editor variable
Post by alex_jitianu »
Hi Stefan,
That note actually refers to a different issue: while editing attributes with form controls, reserved characters (&, <) were not escaped. The fix to the issue from this thread is not present in the update.
Best regards,
Alex
That note actually refers to a different issue: while editing attributes with form controls, reserved characters (&, <) were not escaped. The fix to the issue from this thread is not present in the update.
Best regards,
Alex
Re: Replacing characters in an "ask" editor variable
Hi Stefan,
Oxygen 16.0 which was released a couple of days ago should have a fix for your improvement request to automatically escape content inserted by the user using the ask editor variable prompt dialog.
Regards,
Radu
Oxygen 16.0 which was released a couple of days ago should have a fix for your improvement request to automatically escape content inserted by the user using the ask editor variable prompt dialog.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Replacing characters in an "ask" editor variable
Hi Radu,
in 17.1 the Author denied to insert unescaped ampersands (&), but doesn't replace them? Is this intended? Or do I have to activate some flag elsewhere?
Kind regards,
Stefan
in 17.1 the Author denied to insert unescaped ampersands (&), but doesn't replace them? Is this intended? Or do I have to activate some flag elsewhere?
Kind regards,
Stefan
Re: Replacing characters in an "ask" editor variable
Hi Stefan,
Just tested an Author InsertFragmentOperation with an XML like:
and you are right, the & should be automatically escaped.
We'll fix this, I will try to integrate a fix also in the next Oxygen 17.1 minor bug fix release.
I'll update this thread when a fix is available.
Regards,
Radu
Just tested an Author InsertFragmentOperation with an XML like:
Code: Select all
<p audience="${ask('Message', url)}"/>
We'll fix this, I will try to integrate a fix also in the next Oxygen 17.1 minor bug fix release.
I'll update this thread when a fix is available.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Replacing characters in an "ask" editor variable
Hi,
Just to update the thread, this problem has been resolved in the latest maintenance build of oXygen 17.1, 2016020417(released on February 5th):
http://www.oxygenxml.com/download.html
The list of bug-fixes can be found here:
http://www.oxygenxml.com/build_history.html#2016020417
You can follow the release/build RSS feed here:
http://www.oxygenxml.com/rssBuildID.xml
Let us know if you encounter further problems with this new build.
Regards,
Ionela
Just to update the thread, this problem has been resolved in the latest maintenance build of oXygen 17.1, 2016020417(released on February 5th):
You can download it from our web site:Author: URL values returned by the ${ask} editor variable used in AuthorOperation parameters were not automatically XML-escaped
http://www.oxygenxml.com/download.html
The list of bug-fixes can be found here:
http://www.oxygenxml.com/build_history.html#2016020417
You can follow the release/build RSS feed here:
http://www.oxygenxml.com/rssBuildID.xml
Let us know if you encounter further problems with this new build.
Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Return to “SDK-API, Frameworks - Document Types”
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