LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Apostrophe Not Displaying Correctly On Webpage (https://www.linuxquestions.org/questions/linux-general-1/apostrophe-not-displaying-correctly-on-webpage-417364/)

justanothersteve 02-19-2006 10:54 PM

How can I get apostrophe's to show up on a webpage I have without a preceeding \

ex:
I'm I\'m

Also the same for " showing up as \"

I'm having the issue with b2evolution but also had the same problem with wordpress. Any ideas

jlliagre 02-20-2006 01:36 AM

Try: '

Wim Sturkenboom 02-20-2006 01:41 AM

From a HTML perspective, you do not need to escape a single quote.
Code:

<!-- some html -->
' displays as single quote

There is a special code for double quotes
Code:

<!-- some html -->
&quot; displays as double quote

Do not forget the semicolon at the end.

There are more codes that you must be aware of, e.g. smaller than &lt; and greater than &gt;.
A list that I found on the internet

jlliagre 02-20-2006 02:46 AM

Quote:

Originally Posted by Wim Sturkenboom
From a HTML perspective, you do not need to escape a single quote.
Code:

<!-- some html -->
' displays as single quote

There is a special code for double quotes
Code:

<!-- some html -->
&quote; displays as double quote

Do not forget the semicolon at the end.

The double quote is not more (nor less) special that the single quote.

&apos; and &quote; can be used to simplify embedding HTML code with other languages syntax, which I presume "b2evolution" and "wordpress" are doing.

Wim Sturkenboom 02-20-2006 09:43 AM

You're right. Always thought that only double quotes could be used in tag attributes. Because of your comment, decided to look it up. According to HTML spec, single quote can be used for that purpose as well.


All times are GMT -5. The time now is 02:46 AM.