Skip to main content

How to insert ampersand symbol.

More
14 years 1 month ago #62115 by watashi
Some product characteristics of my shop contain ampersand symbols (&).
As far as I understand, such symbols must be inserted by using special "escape" syntax, such as & a m p ;
However, after I save the article, & a m p ; is converted back to "&" without the special syntax.
As a result, WWW Validator says a error (see text below).
Is it correct way to keep ampersand in the text as it is without converting it to & amp ;?
If not, how shall I handle it?

TEXT OF THE ERROR
Line 737, Column 20: character "&" is the first character of a delimiter but occurred as data
Briggs & Stratton </span>

This message may appear in several cases:

- You tried to include the "<" character in your page: you should escape it as "&lt;"
- You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
- Another possibility is that you forgot to close quotes in a previous tag.

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #62329 by nicolas
Hi,

When you enter &amp; in the product name, it is saved like that in the database.
When HikaShop then displays the product name, it displays &amp;
Then, your browser converts the &amp; to & as it should when displaying the page. But in the code source of the page, it's &amp; which is there.
So there is no problem on that end.

In our tests, the &amp; is kept and the w3c warning message does not appear once you enter &amp; in the product name.

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #62457 by watashi
Nicolas, noted, thanks.
It seems the reason is because I use RokPad by RocketTheme instead of common TinyMCE.

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #62540 by nicolas
Thank you for your feedback.

Please Log in or Create an account to join the conversation.

Time to create page: 0.176 seconds
Powered by Kunena Forum