Skip to content

Commit 302aca8

Browse files
committed
Use he for HTML entity decoding
1 parent e9c070d commit 302aca8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
"node": "*"
2525
},
2626
"dependencies": {
27+
"cheerio": "0.8.3",
2728
"grunt-wordpress": "1.0.7",
29+
"he": "0.1.2",
2830
"highlight.js": "7.3.0",
29-
"ent": "0.0.5",
30-
"cheerio": "0.8.3",
31-
"rimraf": "2.0.2",
31+
"js-yaml": "2.0.1",
3232
"marked": "0.2.9",
33-
"js-yaml": "2.0.1"
33+
"rimraf": "2.0.2"
3434
},
3535
"devDependencies": {
3636
"grunt": "0.3.17"

tasks/build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function htmlEscape( text ) {
1616

1717
var cheerio = require( "cheerio" ),
1818
hljs = require( "highlight.js" ),
19-
ent = require( "ent" ),
19+
he = require( "he" ),
2020
yaml = require( "js-yaml" );
2121

2222
// Add a wrapper around wordpress-parse-post that supports YAML
@@ -204,7 +204,7 @@ grunt.registerHelper( "syntax-highlight", (function() {
204204

205205
$( "pre > code" ).each(function() {
206206
var $t = $( this ),
207-
code = ent.decode( outdent( $t.html() ) ),
207+
code = he.decode( outdent( $t.html() ) ),
208208
lang = $t.attr( "data-lang" ) ||
209209
getLanguageFromClass( $t.attr( "class" ) ) ||
210210
crudeHtmlCheck( code ) ||

0 commit comments

Comments
 (0)