Permalink
Browse files

Update URLs

  • Loading branch information...
mathiasbynens committed Aug 24, 2014
1 parent 78bc2bb commit f48a09683fcee1ad0ea8ec164333cf5103782a46
Showing with 11 additions and 18 deletions.
  1. +1 −1 LICENSE-MIT.txt
  2. +2 −2 README.md
  3. +2 −2 he.js
  4. +1 −1 man/he.1
  5. +3 −10 package.json
  6. +2 −2 src/he.js
@@ -1,4 +1,4 @@
Copyright Mathias Bynens <http://mathiasbynens.be/>
Copyright Mathias Bynens <https://mathiasbynens.be/>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -1,6 +1,6 @@
# he [![Build status](https://travis-ci.org/mathiasbynens/he.svg?branch=master)](https://travis-ci.org/mathiasbynens/he) [![Code coverage status](http://img.shields.io/coveralls/mathiasbynens/he/master.svg)](https://coveralls.io/r/mathiasbynens/he) [![Dependency status](https://gemnasium.com/mathiasbynens/he.svg)](https://gemnasium.com/mathiasbynens/he)

_he_ (for “HTML entities”) is a robust HTML entity encoder/decoder written in JavaScript. It supports [all standardized named character references as per HTML](http://www.whatwg.org/specs/web-apps/current-work/multipage/named-character-references.html), handles [ambiguous ampersands](http://mathiasbynens.be/notes/ambiguous-ampersands) and other edge cases [just like a browser would](http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tokenizing-character-references), has an extensive test suite, and — contrary to many other JavaScript solutions — _he_ handles astral Unicode symbols just fine. [An online demo is available.](http://mothereff.in/html-entities)
_he_ (for “HTML entities”) is a robust HTML entity encoder/decoder written in JavaScript. It supports [all standardized named character references as per HTML](http://www.whatwg.org/specs/web-apps/current-work/multipage/named-character-references.html), handles [ambiguous ampersands](https://mathiasbynens.be/notes/ambiguous-ampersands) and other edge cases [just like a browser would](http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tokenizing-character-references), has an extensive test suite, and — contrary to many other JavaScript solutions — _he_ handles astral Unicode symbols just fine. [An online demo is available.](http://mothereff.in/html-entities)

## Installation

@@ -318,7 +318,7 @@ Thanks to [Simon Pieters](http://simon.html5.org/) ([@zcorpan](https://twitter.c

| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
|---|
| [Mathias Bynens](http://mathiasbynens.be/) |
| [Mathias Bynens](https://mathiasbynens.be/) |

## License

4 he.js

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -71,6 +71,6 @@ Print the decoded version of the HTML string that gets piped in.
.Sh BUGS
he's bug tracker is located at <https://github.com/mathiasbynens/he/issues>.
.Sh AUTHOR
Mathias Bynens <http://mathiasbynens.be/>
Mathias Bynens <https://mathiasbynens.be/>
.Sh WWW
<http://mths.be/he>
@@ -14,23 +14,16 @@
"decode",
"unicode"
],
"licenses": [
{
"type": "MIT",
"url": "http://mths.be/mit"
}
],
"license": "MIT",
"author": {
"name": "Mathias Bynens",
"url": "http://mathiasbynens.be/"
"url": "https://mathiasbynens.be/"
},
"repository": {
"type": "git",
"url": "https://github.com/mathiasbynens/he.git"
},
"bugs": {
"url": "https://github.com/mathiasbynens/he/issues"
},
"bugs": "https://github.com/mathiasbynens/he/issues",
"files": [
"LICENSE-MIT.txt",
"he.js",
@@ -37,7 +37,7 @@
'&': '&amp;',
'\'': '&#x27;',
'<': '&lt;',
// See http://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
// See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
// following is not strictly necessary unless it’s part of a tag or an
// unquoted attribute value. We’re only escaping it to support those
// situations, and for XML support.
@@ -206,7 +206,7 @@
return string
// Encode astral symbols.
.replace(regexAstralSymbols, function($0) {
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
var high = $0.charCodeAt(0);
var low = $0.charCodeAt(1);
var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;

0 comments on commit f48a096

Please sign in to comment.