Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #10540
| Message-ID | <1934714.aqSPkdTlGX@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2012-01-24 17:32 +0100 |
| Subject | Re: Unterminated String constant error |
| Newsgroups | comp.lang.javascript |
| References | <db47ff6a-ac18-4549-b606-6916cf338c90@i18g2000yqf.googlegroups.com> <4f1e7b4f$0$6880$e4fe514c@news2.news.xs4all.nl> |
| Followup-To | comp.lang.javascript |
Followups directed to: comp.lang.javascript
Erwin Moller wrote:
> If you want the title of that <td> to hold information from the database
> you should do something like this:
> [PHP example]
>
> <td title="<?php echo $myTitle; ?>">...</td>
>
> Mind the "".
> Also make sure $myTitle is appropriately escaped.
Like
<?php echo htmlspecialchars($myTitle, ENT_COMPAT, $encoding); ?>
> When the raw data for title contains "
or `<' and `&'.
> you get into trouble when you don't escape.
ACK.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
Unterminated String constant error Bhushan Kakulte <b.kakulte@gmail.com> - 2012-01-23 23:18 -0800
Re: Unterminated String constant error Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-01-24 10:35 +0100
Re: Unterminated String constant error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-24 17:32 +0100
csiph-web