Internet Explorer - Avoiding Single Quotes

In Internet Explorer, how to avoid single quotes.

' works for firefox etc. but Internet Explorer doesn't like it.

for example

<input type="text" value='Single quotes `&apos;` Here' /> 

works in firefox but not in IE

+3
source share
4 answers

& APOS; invalid HTML - this is just an XML sequence. FireFox simply shares too much code between its html and xml parser. Use & # 39; sequence (correct html escape for), as already suggested.

+10
source

Use &#39;

Here you can see a list of all the objects of the ISO-8859-1 HTML code (escape codes) .

+5
source

AJM , :

<input type="text" value='Single quotes &#39; Here' />

+3

.

It seems that some versions of Internet Explorer (correctly) do not recognize the object &apos;in HTML, only in XML, so you might be lucky with &#39;.

+3
source

Source: https://habr.com/ru/post/1714079/


All Articles