Pages: [1] |
|
|
Author |
Topic: entity encoding difficulties (Read 188 times) |
dopriorat
Posts: 5
|
Hi,
I am starting to use snippetMaster to edit a bunch of XML pages that then get parsed into my HTML website.
The problem comes when my users insert special characters that the Tinymce editor writes down with codes like á é and so forth. XML doesn't seem to accept these encodings and throws a parsing error. It does accept the entities to be encoded with the character number, like ß .
I have seen in the TinyMCE documentation that I can define in the Tinymce config file (tiny_mce_src.js) entity_encoding : "numeric" and it should be working, but I am experiencing that no matter what value I insert in there, when editing a file inside snippetmaster, it always gives me the á kind of encoding.
I am reading somewhere that this could be due to the way that data is transfered from tinymce to the files, but I did not find anything regarding this in this forum, so I hope you can shed some light into my problem.
Thanks
Peter
|
|
|
|
admin
Forum Administrator

Posts: 2232
SnippetMaster Author
|
To be honest, I'm not sure. Using numeric encoding is not proper HTML, so I've never looked into using it.
I will add the ability to select numeric encoding type in the next version, as a configurable option.
|
|
|
|
dopriorat
Posts: 5
|
Maybe I have not made myself clear by calling it numeric encoding. In the document http://www.w3.org/TR/html401/charset.html in chapter 5.3.1 it defines what I refer to, and calls it numeric character references. Tinymce allows it as it is propper xhtml (and by this document, I believe html also).
Is there any way to hack the system for now and allow the encoding used by configuration in tinymce to be carried through to the output file? having this fuctionality would convince me to buy the license as it gives me the functionality I cannot live without.
Thanks a lot,
Peter
|
|
|
|
admin
Forum Administrator

Posts: 2232
SnippetMaster Author
|
There is no way to modify the template file that controls the tinyMCE editor, without a custom modification for you... (which I just don't have the time to do right now).
You might be able to add your own configuration to tinyMCE by playing around with the tinymce files themselves, but I don't know how to do that.. maybe try asking on the tinyMCE forms? (ie: How to add a configuration setting, if you don't have access to the tinyMCE configuration javascript in the page setting up the editor.)
|
|
|
|
dopriorat
Posts: 5
|
Dear Admin,
after a few hours fighting with my backend xml2html parser to convert the á-like characters to numeral caracters, I have noticed that snippetmaster actually calls the tiny_mce.js file instead of the tiny_mce_src.js file, being both identical except for the spaces.
Just editing this file and changing entity_encoding from named to numeric I got the result I needed.
Thanks
Peter
|
|
|
|
admin
Forum Administrator

Posts: 2232
SnippetMaster Author
|
Excellent!
|
|
|
|
|
Pages: [1]
|
|
|
|