SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast bobbobbobbob's Avatar
    Join Date
    Apr 2004
    Location
    bobbobbobbob
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with content validation

    Hello,

    I'm trying to make my entire site validate, and I'm running into a problem with user-submitted content. The site is primarily user-submitted content. Is there any way to exclude the text that they enter from the validation?

    The error that I am getting is: non SGML character number.

    Thanks,
    Zack

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I take it you're using PHP? If so you're going to have to grab the markup, and either convert it to an acceptable format, or strip them entirely.

  3. #3
    SitePoint Enthusiast bobbobbobbob's Avatar
    Join Date
    Apr 2004
    Location
    bobbobbobbob
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hm, that's what I figured (although I hoped that there was a different way).

    Alright, I guess I'll just leave the content pages unvalidated, I really don't think that it will change anything.

    Thanks a lot for the quick help.

  4. #4
    SitePoint Addict
    Join Date
    Apr 2001
    Location
    Devon, UK
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could try using wiki-style editing. That would allow users to style their text, but you would convert it to valid XHTML.


Bookmarks

Posting Permissions

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