gulp-entity-convert
Gulp wrapper for entity-convert. Converts Unicode characters to either HTML or CSS entities. Useful if your built files eventually go to a system that can't handle Unicode character sets.
Install with npm
npm install --save-dev gulp-entity-convert
var gulp = require('gulp');
var entityconvert = require('gulp-entity-convert');
gulp.task('default', function () {
gulp.src('./src/**/*.html')
.pipe(entityconvert())
.pipe(gulp.dest('.build/'));
});By default, this plugin treats all input files as HTML and will convert characters to HTML entities. You can pass in an options object with the type property to specify either HTML or CSS, like so:
.pipe(entityconvert({ type: 'css' }))or if you want to be specific:
.pipe(entityconvert({ type: 'html' }))MIT