numeric character reference being replaced by character.
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
numeric character reference being replaced by character.
In my HTML files my numeric character references are being replaced after saving by the charaters themselves, so § is turning into the actual Section symbol within my code and so forth. I want the code to stay as it is and not get turned into the character, is there any way to force textpad to leave them alone?
I tried this, but I can't reproduce it, this is what I have:
Code: Select all
<html>
<head>
<title></title>
</head>
<body>
& #167;
<!-- typed a space on purpose, otherwise this forum converts it to a § -->
</body>
</html>
well yeah thats what im typing into my html documents, yet, like this forum is doing, its being converted into the symbol instead of staying in code form.
I need it to stay in code form because the program I am using to read the HTML document wont read the symbol, it will only read the code, so when it outputs my HTML, there is nothing where the symbol should be if Textpad has converted it (which it does every time I save the doc).
So basically I need Textpad to leave my codes alone, and not convert them into the symbols.
Dont know if there is any way to tell it to do that however. I sure cant find a way.
I need it to stay in code form because the program I am using to read the HTML document wont read the symbol, it will only read the code, so when it outputs my HTML, there is nothing where the symbol should be if Textpad has converted it (which it does every time I save the doc).
So basically I need Textpad to leave my codes alone, and not convert them into the symbols.
Dont know if there is any way to tell it to do that however. I sure cant find a way.
Named Entities
Have you tried using named entities instead of Hex values ?
Unless you have to use XHTML/XML, it should not be converted.
Even if you have to use XHTML/XML, you can escape the ampersand and use named entities
Unless you have to use XHTML/XML, it should not be converted.
Even if you have to use XHTML/XML, you can escape the ampersand and use named entities
Charles
http://www.charleswebdesign.com/
http://www.charleswebdesign.com/