Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Apr 2004
    Posts
    684
    Thanks
    24
    Thanked 1 Time in 1 Post

    Convert HTML into xHTML

    Hey guys..... I'm using a WYSIWYG editor on a site & problem is it doesn't output the HTML in xHTML so I was wondering if there was any available solutions currently around for this? AFAIK there isn't any in-built functions for this.

    Thanks!

  • #2
    New Coder
    Join Date
    Apr 2006
    Posts
    20
    Thanks
    2
    Thanked 1 Time in 1 Post
    Well, there is a utility called Tidy that converts HTML to XHTML, but truthfully, you'd be better off investing a little time into learning HTML / XHTML. WYSIWYG editors are notorious for outputting horrific code.

    Learning is pretty simple, and there are a ton of free sources on the web. I'd start at w3schools.com

    --Josh

  • #3
    Regular Coder
    Join Date
    Apr 2004
    Posts
    684
    Thanks
    24
    Thanked 1 Time in 1 Post
    Hey..... sorry I should have been more clear..... I'm already experienced in xHTML/HTML..... but I am using a WYSIWYG editor in an application for a client but the problem is the code it generates is in HTML & not xHTML & hence I wanted to feed the output into a converter function before inserting the data into the database.

    Cheers!

  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by infinivert View Post
    Well, there is a utility called Tidy that converts HTML to XHTML, but truthfully, you'd be better off investing a little time into learning HTML / XHTML. WYSIWYG editors are notorious for outputting horrific code.

    Learning is pretty simple, and there are a ton of free sources on the web. I'd start at w3schools.com

    --Josh
    Quote Originally Posted by cyphix View Post
    Hey..... sorry I should have been more clear..... I'm already experienced in xHTML/HTML..... but I am using a WYSIWYG editor in an application for a client but the problem is the code it generates is in HTML & not xHTML & hence I wanted to feed the output into a converter function before inserting the data into the database.

    Cheers!
    could be a solution, as infinivert said:

    php tidy

    or modify the editor if you have access to source. If it generate valid html 4.01 could be simple to make it generate xhtml.

    regards


  •  

    Posting Permissions

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