Skip to content

ozayo/escape-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Escape Html

HTML Escape is a tool for HTML escaping process. When escaping, it replaces special HTML characters with their HTML equivalents (entities).

For example

if you need to post a piece of HTML/JavaScript code in your article/blog post/any other HTML document, you need to escape it to make browsers don't treat it as HTML.

<h1>I'm big BAD HTML</h1>
<script>
  alert("your hacked");
</script>

HTML Escape process replace all HTML reserved chacaters (<, >, &, ") to (&lt;, &gt;, &amp;, &quot;).

And the result will be as follows.

&lt;h1&gt;I'm big BAD HTML&lt;/h1&gt; &lt;script&gt;alert(&quot;your
hacked&quot;);&lt;/script&gt;

Code info

HTML, JavaScript, Bootstrap Css

Readme.md created with readme.so.

Roadmap

[x] Add single quotes (') option with checkbox

[x] Publish

[ ] Add Unescape (reverse) process.

Releases

No releases published

Packages

No packages published

Languages