Pages: [1] |
|
|
Author |
Topic: Snippet changes special characters such as £ (Read 948 times) |
peternet
Posts: 6
|
Hi
I am using snippetmaster to edit include files. These are included into a main PHP file where the doc type etc is set
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
My problem is that special characters in the include file are reset from e.g. £ to £ and therefore dont display. Also occasionally the include file gets head and body tags added.
Any help please - I presume its to do with settings in ADMIN HTML Code Validation & Cleanup Rule Sets
many thanks
Peter
|
|
|
|
Jenkinhill
|
I have not had a problem with £ being converted. I just checked again and the entity remains as originally coded. Have you tried using £ instead of £ ?
As for editing includes, the tinyMCE editor at the core of SnippetMaster is an XHTML editor and during the save process tries to ensure that the edited file is valid XHTML - and as such it requires head & body tags. I have no idea why it should add the tags occasionally rather than every time.
|
Kelvyn
|
|
|
peternet
Posts: 6
|
Hi many thanks - yes £ does seem to work better - but curiously the editor then changes that to £ and keeps it as such. It does then work on future edits - strange - has anybody else had issues with special characters - and found solutions?
The adding of head and body tags ceases to be a problem if the include is wrapped in <!--BeginSnippet--> tags
many thanks
P
|
|
|
|
admin
Forum Administrator

Posts: 2847
SnippetMaster Author
|
That's really interesting about the different character encoding. Hmm.. I wasn't able to recreate the problem, but I do know that it would be specific to whatever browser you're using. The HTML is taken by the browser, so if you're using IE (for example), it tends to cause some conversion problems for character sets it doesn't understand. The new version of IE that was just released is likely to work a lot better. Firefox should not have any problems.
For the addition of head and html tags, this will always happen if you do a "whole file edit" instead of using the "SNIPPET" method. This is because the editor is a proper XHTML editor, and if you choose to edit a whole file, it expects valid code to be there.. so if your file is missing the head and body tags, etc.. then they'll be automatically added.
When you choose to edit a snippet only, then the editor will not try to automatically add the head/body tags, since it is then placed in "snippet only mode" before loading up your code to edit.
I might add a "switch" or something to allow you to dynamically turn the "whole file edit" on/off.. as it appears more and more people are using SnippetMaster as a file editor instead of an HTML editor. Not sure how best to implement this, but I'm open to ideas...
|
|
|
|
|
Pages: [1]
|
|
|
|