visionmedia/ejs — pull request #168 by enowit (2014-04-18 03:19:14+00:00)
Title: Update ejs.js

Able to identify and remove BOM header.

new function:
line = 52

/**
* Render an EJS file at the given `path` (easton changed)
* @param {String} path
* @param {String} encoding
* @api private
*/
function readEJSFile(path, encoding) {
var buffer = read(path);
if (buffer[0] == 239 && buffer[1] == 187 && buffer[2] == 191) {
buffer = buffer.slice(3);
}
return buffer.toString(encoding);
}