Results 1 to 3 of 3

Thread: Apostrophe's in strings

  1. #1
    Join Date
    Jun 2012

    Apostrophe's in strings

    I have an issue where I pull values from a database. The values have apostrophe's in them but when they are displayed on the page the string stops at the apostrophe (i.e. today's is displayed as today).

    How can I get the entire string to be displayed?

    Here is where I am displaying the string:
    <h1 class='tabletitle'><%=rs("FloorName")%>&nbsp;(<%=dspLayoutName%>)</h1>
    Thanks for your help.

  2. #2
    Join Date
    Oct 2010
    Versailles, France
    Use the functions addcslashes() and stripslashes() with PHP or, with uft-8 charset, replace all apostrophes with the typographic apostrophe (’) with this code
    This typeset apostrophe is obtain with alt 0146.

  3. #3
    Join Date
    Jul 2003
    The City of Roses
    I'm having numerous brain cramps here.

    First, if you're outputting unescaped apostrophes, then the problem you should be facing is XSS, not truncated strings. Second, those look like ASP tags, so PHP advice probably won't help. And third, the one thing I definitely don't see is JavaScript, yet you posted in a JavaScript forum.

    You should probably be posting in the ASP or .NET forums, and you'll probably need to provide a lot more detail.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles