Characters in attributes being converted to unicode












0














I'm adding HTML Tag Attributes to a section in a Gantry 5 layout, using the section's settings. But any special characters are rendered as Unicode Hex Character Codes in the resultant HTML. So adding the tag



data-0


to the section



g-mainbottom1


with the attribute



background-position: 50% 100px


results in this div:



<section id="g-mainbottom1" data-0="background-position: 50% 100px;">


rather than the desired



<section id="g-mainbottom1" data-0="background-position: 50% 100px;">


Assuming there's nothing I can do to prevent the conversion behaviour, is there anything I can do with the actual text to prevenmt these characters from being converted Unicode Hex equivalents?










share|improve this question


















  • 1




    That is actually the same thing. I don't know why the system sees fit to escape some characters, but the result is the same.
    – Mr Lister
    Nov 22 at 19:10










  • You may be surprised to learn that the "A..Z" and the other text in your HTML is also Unicode.
    – usr2564301
    Nov 25 at 11:01


















0














I'm adding HTML Tag Attributes to a section in a Gantry 5 layout, using the section's settings. But any special characters are rendered as Unicode Hex Character Codes in the resultant HTML. So adding the tag



data-0


to the section



g-mainbottom1


with the attribute



background-position: 50% 100px


results in this div:



<section id="g-mainbottom1" data-0="background-position: 50% 100px;">


rather than the desired



<section id="g-mainbottom1" data-0="background-position: 50% 100px;">


Assuming there's nothing I can do to prevent the conversion behaviour, is there anything I can do with the actual text to prevenmt these characters from being converted Unicode Hex equivalents?










share|improve this question


















  • 1




    That is actually the same thing. I don't know why the system sees fit to escape some characters, but the result is the same.
    – Mr Lister
    Nov 22 at 19:10










  • You may be surprised to learn that the "A..Z" and the other text in your HTML is also Unicode.
    – usr2564301
    Nov 25 at 11:01
















0












0








0







I'm adding HTML Tag Attributes to a section in a Gantry 5 layout, using the section's settings. But any special characters are rendered as Unicode Hex Character Codes in the resultant HTML. So adding the tag



data-0


to the section



g-mainbottom1


with the attribute



background-position: 50% 100px


results in this div:



<section id="g-mainbottom1" data-0="background-position: 50% 100px;">


rather than the desired



<section id="g-mainbottom1" data-0="background-position: 50% 100px;">


Assuming there's nothing I can do to prevent the conversion behaviour, is there anything I can do with the actual text to prevenmt these characters from being converted Unicode Hex equivalents?










share|improve this question













I'm adding HTML Tag Attributes to a section in a Gantry 5 layout, using the section's settings. But any special characters are rendered as Unicode Hex Character Codes in the resultant HTML. So adding the tag



data-0


to the section



g-mainbottom1


with the attribute



background-position: 50% 100px


results in this div:



<section id="g-mainbottom1" data-0="background-position: 50% 100px;">


rather than the desired



<section id="g-mainbottom1" data-0="background-position: 50% 100px;">


Assuming there's nothing I can do to prevent the conversion behaviour, is there anything I can do with the actual text to prevenmt these characters from being converted Unicode Hex equivalents?







unicode unicode-escapes






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 22 at 18:16









small-media-large

42




42








  • 1




    That is actually the same thing. I don't know why the system sees fit to escape some characters, but the result is the same.
    – Mr Lister
    Nov 22 at 19:10










  • You may be surprised to learn that the "A..Z" and the other text in your HTML is also Unicode.
    – usr2564301
    Nov 25 at 11:01
















  • 1




    That is actually the same thing. I don't know why the system sees fit to escape some characters, but the result is the same.
    – Mr Lister
    Nov 22 at 19:10










  • You may be surprised to learn that the "A..Z" and the other text in your HTML is also Unicode.
    – usr2564301
    Nov 25 at 11:01










1




1




That is actually the same thing. I don't know why the system sees fit to escape some characters, but the result is the same.
– Mr Lister
Nov 22 at 19:10




That is actually the same thing. I don't know why the system sees fit to escape some characters, but the result is the same.
– Mr Lister
Nov 22 at 19:10












You may be surprised to learn that the "A..Z" and the other text in your HTML is also Unicode.
– usr2564301
Nov 25 at 11:01






You may be surprised to learn that the "A..Z" and the other text in your HTML is also Unicode.
– usr2564301
Nov 25 at 11:01














1 Answer
1






active

oldest

votes


















0














I think you forgot to use <meta charset="UTF-8"> in the <head> tag



<head>
<meta charset="UTF-8">
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<meta name="author" content="John Doe">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>



Metadata is data (information) about data.



The tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable.



Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata.



The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services.



HTML5 introduced a method to let web designers take control over the viewport (the user's visible area of a web page), through the tag (See "Setting The Viewport" example below).




reference https://www.w3schools.com/tags/tag_meta.asp






share|improve this answer





















  • <meta charset="UTF-8"> is indeed in the <head>. However, the fact that browsers seems to intepret this OK for some reason, and the scripts relying on these attributes appear to work fine. So it's not an issue for me any more. Still slightly puzzled as to why it's rendering this way, but it works, whatever!
    – small-media-large
    Nov 26 at 10:43













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53436369%2fcharacters-in-attributes-being-converted-to-unicode%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














I think you forgot to use <meta charset="UTF-8"> in the <head> tag



<head>
<meta charset="UTF-8">
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<meta name="author" content="John Doe">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>



Metadata is data (information) about data.



The tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable.



Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata.



The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services.



HTML5 introduced a method to let web designers take control over the viewport (the user's visible area of a web page), through the tag (See "Setting The Viewport" example below).




reference https://www.w3schools.com/tags/tag_meta.asp






share|improve this answer





















  • <meta charset="UTF-8"> is indeed in the <head>. However, the fact that browsers seems to intepret this OK for some reason, and the scripts relying on these attributes appear to work fine. So it's not an issue for me any more. Still slightly puzzled as to why it's rendering this way, but it works, whatever!
    – small-media-large
    Nov 26 at 10:43


















0














I think you forgot to use <meta charset="UTF-8"> in the <head> tag



<head>
<meta charset="UTF-8">
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<meta name="author" content="John Doe">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>



Metadata is data (information) about data.



The tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable.



Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata.



The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services.



HTML5 introduced a method to let web designers take control over the viewport (the user's visible area of a web page), through the tag (See "Setting The Viewport" example below).




reference https://www.w3schools.com/tags/tag_meta.asp






share|improve this answer





















  • <meta charset="UTF-8"> is indeed in the <head>. However, the fact that browsers seems to intepret this OK for some reason, and the scripts relying on these attributes appear to work fine. So it's not an issue for me any more. Still slightly puzzled as to why it's rendering this way, but it works, whatever!
    – small-media-large
    Nov 26 at 10:43
















0












0








0






I think you forgot to use <meta charset="UTF-8"> in the <head> tag



<head>
<meta charset="UTF-8">
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<meta name="author" content="John Doe">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>



Metadata is data (information) about data.



The tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable.



Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata.



The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services.



HTML5 introduced a method to let web designers take control over the viewport (the user's visible area of a web page), through the tag (See "Setting The Viewport" example below).




reference https://www.w3schools.com/tags/tag_meta.asp






share|improve this answer












I think you forgot to use <meta charset="UTF-8"> in the <head> tag



<head>
<meta charset="UTF-8">
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<meta name="author" content="John Doe">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>



Metadata is data (information) about data.



The tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable.



Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata.



The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services.



HTML5 introduced a method to let web designers take control over the viewport (the user's visible area of a web page), through the tag (See "Setting The Viewport" example below).




reference https://www.w3schools.com/tags/tag_meta.asp







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 22 at 21:42









Poode

33327




33327












  • <meta charset="UTF-8"> is indeed in the <head>. However, the fact that browsers seems to intepret this OK for some reason, and the scripts relying on these attributes appear to work fine. So it's not an issue for me any more. Still slightly puzzled as to why it's rendering this way, but it works, whatever!
    – small-media-large
    Nov 26 at 10:43




















  • <meta charset="UTF-8"> is indeed in the <head>. However, the fact that browsers seems to intepret this OK for some reason, and the scripts relying on these attributes appear to work fine. So it's not an issue for me any more. Still slightly puzzled as to why it's rendering this way, but it works, whatever!
    – small-media-large
    Nov 26 at 10:43


















<meta charset="UTF-8"> is indeed in the <head>. However, the fact that browsers seems to intepret this OK for some reason, and the scripts relying on these attributes appear to work fine. So it's not an issue for me any more. Still slightly puzzled as to why it's rendering this way, but it works, whatever!
– small-media-large
Nov 26 at 10:43






<meta charset="UTF-8"> is indeed in the <head>. However, the fact that browsers seems to intepret this OK for some reason, and the scripts relying on these attributes appear to work fine. So it's not an issue for me any more. Still slightly puzzled as to why it's rendering this way, but it works, whatever!
– small-media-large
Nov 26 at 10:43




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53436369%2fcharacters-in-attributes-being-converted-to-unicode%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

What visual should I use to simply compare current year value vs last year in Power BI desktop

How to ignore python UserWarning in pytest?

Alexandru Averescu