html-entities

Parsing XML With Single Quotes?

I am currently running into a problem where an element is coming back from my xml file with a single quote in it. This is causing xml_parse to break it up into multiple chunks, example: Get Wired, You're Hired! Is then enterpreted as 'Get Wired, You' being one object, the single quote being a second, and 're Hired!' as a third. What I w...

Using htmlentities in a string

Hi. I know I should be using htmlentities for all my form text input fields but this doesn't work: <?php echo "<tr> <td align=\"right\">".Telephone." :</td> <td><input type=\"text\" name=\"telephone\" size=\"27\" value=\"htmlentities($row[telephone])\"> Inc. dialing codes </td> </tr>"; ?> I...

How do I make JSP tag files NOT ignore all whitespace?

I'm really stumped on this one. I want to output a list and have the tag file take care of commas, singular versus plural, etc. but when I display the list it completely ignores whitespace so everythingrunstogetherlikethis. I tried using the HTML entities "thinsp", "ensp" and "emsp" (I can't use "nbsp", these have to be breaking), but th...

htmlentities equivalent in JSP?

I'm a php guy, but I have to do some small project in JSP. I'm wondering if there's an equivalent to htmlentities function (of php) in JSP. Thanks for your time. Best regards. ...

Getting the € with htmlentities

I am really trying to show what htmlentities gives me, but it doesn't give & euro; for the € character. I am trying echo htmlentities(htmlentities("LISBOA-VIENA DESDE 99€ TAXAS INCLUÍDAS, RESERVE JÁ",ENT_COMPAT,ISO-8859-1),ENT_COMPAT,ISO-8859-1); echo '<br>'; echo htmlentities(htmlentities("LISBOA-VIENA DESDE 99€ TAXAS INCLUÍDA...

Javascript: How to dynamically create an <option> that contains an HTML entity (— ... «)

I'd like to add an <option> element to a <select> element where the <option> element's text contains an HTML entity: &mdash; In HTML, the code would look like this: <select name="test" id="test"> <option value="">&mdash; Select One &mdash;</option> </select> My Javascript code looks like this: function selectOne() { var e = docume...

xslt, javascript and unescaped html entities

i have a tiny little problem with xslt, js and html entities, eg. within a template: <script type="text/javascript"> <xsl:value-of select="/some/node"/> for (var i = 0; i &lt; 5; i++) { // ^^^ js error } </script> <script type="text/javascript"> <xsl:value-of select="/some/node"/> for (var i = 0; ...

When Should One Use HTML Entities

This has been confusing me for some time. With the advent of utf-8 as the de-facto standard in web development I'm not sure in which situations I'm supposed to use the html entities and for which ones should I just use the utf-8 character. Examples: em dash, ampersand, etc. Please do shed light on this issue. It will be appreciated. ...

Setting nodeValue of text node in Javascript when string contains html entities

When I set a value of a text node with node.nodeValue="string with &#xxxx; sort of characters" ampersand gets escaped. Is there an easy way to do this? ...

HTML entities and charset in IE

I am displaying html entity &#10003; (a check mark: ✓) in an html document that uses iso-8859-1 for the character set. In Firefox, it displays as a check mark. In IE, it displays as a square box. Switching to UTF-8 doesn't seem to make a difference. Is there a reliable way to display these entities in IE 6 & 7 without using images? ...

Convert characters to HTML Entities in Cocoa

I am currently trying to put together an URL where I specify some GET parameters. But I want to use japanese or other characters too in this URL. Is there a way to convert a NSString to a string containing the HTML entities for the 'special' characters in my NSString? I am currently using the following code, which seems to work, except...

Convert HTML Character Back to Text Using Java Standard Library

Hello all, I would like to convert some HTML characters back to text using Java Standard Library. I was wondering whether any library would achieve my purpose? /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here // "Happy & Sad" in HTML form. String ...

Euro sign or other entity in Javascript alert/messagebox

Does anybody know how i can show a euro or other html entity in javascript alert windows? ...

How to show Unicode characters in IE using HTML

I'm trying to show the copyright and infinity signs at the bottom of my page using this code: &#x00A9 Copyright Mikle 2009 - &#x221E This works perfectly in Firefox 2, 3 and Chrome. IE7 though, is showing me the actual codes (like you see above) instead of what I expect and the other browser show: © Copyright Mikle 2009 - ∞ This is...

Converting fractions to html entities

We've got some fraction information stored in the database, e.g. ¾ ½ Short of doing a search and replace, are there any inbuilt PHP functions that will automatically convert these to proper html entities? ...

How to convert html entities into symbols?

Hi, I have made some adaptations to the script from this answer. and I am having problems with unicode. Some of the questions end up being written poorly. Some answers and responses end up looking like: Yeah.. I know.. I&#8217;m a simpleton.. So what&#8217;s a Singleton? (2) How can I make the &#8217; to be translated to the right cha...

Replace html entities with the corresponding utf-8 characters in Python 2.6

I have a html text like this: &lt;xml ... &gt; and I want to convert it to something readable: <xml ...> Any easy (and fast) way to do it in Python? ...

Some Basic Python Questions

I'm a total python noob so please bear with me. I want to have python scan a page of html and replace instances of Microsoft Word entities with something UTF-8 compatible. My question is, how do you do that in Python (I've Googled this but haven't found a clear answer so far)? I want to dip my toe in the Python waters so I figure somet...

How to unescape apostrophes and such in Python?

I have a string with symbols like this: &#39; That's an apostrophe apparently. I tried saxutils.unescape() without any luck and tried urllib.unquote() How can I decode this? Thanks! ...

Converting &amp; to & in Objective-C

Hi All, I have a URL string in the following format. http://myserver.com/_layouts/feed.aspx?xsl=4&amp;amp;web=%2F&amp;amp;page=dda3fd10-c776-4d69-8c55-2f1c74b343e2&amp;amp;wp=476f174a-82df-4611-a3df-e13255d97533 I want to replace &amp; with & in the above URL. My result should be: http://myserver.com/_layouts/feed.aspx?xsl=4&a...