SnippetMaster Support Forums
Return to main website
 
December 03, 2007, 06:44:27 AM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 03, 2007, 06:44:27 AM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: entity encoding difficulties « previous next »
Pages: [1] Print
Author Topic: entity encoding difficulties  (Read 39 times)
dopriorat

Posts: 4


[-] entity encoding difficulties
« on: November 30, 2007, 03:00:02 AM »

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
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2081

SnippetMaster Author


WWW
[-] Re: entity encoding difficulties
« Reply #1 on: November 30, 2007, 03:05:30 AM »

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.
Report to moderator   Logged
dopriorat

Posts: 4


[-] Re: entity encoding difficulties
« Reply #2 on: November 30, 2007, 03:29:38 AM »

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
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2081

SnippetMaster Author


WWW
[-] Re: entity encoding difficulties
« Reply #3 on: November 30, 2007, 06:15:47 AM »

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.)

Report to moderator   Logged
dopriorat

Posts: 4


[-] Re: entity encoding difficulties
« Reply #4 on: November 30, 2007, 01:26:56 PM »

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
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2081

SnippetMaster Author


WWW
[-] Re: entity encoding difficulties
« Reply #5 on: November 30, 2007, 01:30:32 PM »

Excellent!
Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: entity encoding difficulties « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!