Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 987819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:32:34+00:00 2026-05-16T05:32:34+00:00

Nearly all browsers use a certain amount of leeway in rendering invalid HTML. For

  • 0

Nearly all browsers use a certain amount of leeway in rendering invalid HTML. For example, they would render x < y as if it were written x &lt; y because it is “clear” that the < is intended as a literal character, not part of an HTML tag.

Where can I find that logic as a separate “cleanup” module? Such a module would convert x < y to x &lt; y

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:32:35+00:00Added an answer on May 16, 2026 at 5:32 am

    Try looking at the source code for Tidy.

    HTML before running through Tidy:

    <html>
    
     <head>
      <title>boo</title>
     </head>
    
     <body>
       x < y
     </body>
    
    </html>
    

    Same HTML after running through Tidy:

    <html>
    <head>
      <meta name="generator" content=
      "HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
    
      <title>boo</title>
    </head>
    
    <body>
      x &lt; y
    </body>
    </html>
    

    Notice that x < y was changed to x &lt; y.

    UPDATE

    Based on your comment, you should probably use Tidy to clean up your HTML. I believe there are Tidy libraries for most of the common languages, that will clean up your HTML for you. If you are using PHP, there is PHP Tidy.

    UPDATE

    I noticed that you said you’re using C#. You can use Tidy with C# as well. Here’s something I found. I don’t develop in C# and I haven’t tried this out so YMMV:

    Fix Up Your HTML with HTML Tidy and .NET

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Nearly all my JS files are wrapped in anonymous functions. If I include use
So, I'm a huge IPython fan, though I'm sure I don't use nearly all
So, from what I've seen nearly all the IE compatible drag-n-drop use positioning to
Using SQLite I need to copy nearly all of an existing row from a
I have upgraded my site to wordpress 3.4 and its breaking nearly all the
(Nearly solved, but not quite) (My temporary solution is to use a void method
I'm creating a C# framework in which (nearly) all of my classes will be
I'm intrigued by git. I've used nearly all of the usual players over the
I've a very basic class, name it Basic, used in nearly all other files
My current project has a small user base and nearly all clients will be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.