2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

🐛 Fixed escaping < in reading time helper (#9508)

no issue

Using the < character raw isn't w3 complaint
This commit is contained in:
Vikas Potluri 2018-03-18 21:47:58 -05:00 committed by Aileen Nowak
parent 9030161db9
commit 63aeebb144
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ module.exports = function reading_time(options) {// eslint-disable-line camelcas
readingTimeSeconds,
readingTimeMinutes,
readingTime,
seconds = _.isString(options.hash.seconds) ? options.hash.seconds : '< 1 min read',
seconds = _.isString(options.hash.seconds) ? options.hash.seconds : '&lt; 1 min read',
minute = _.isString(options.hash.minute) ? options.hash.minute : '1 min read',
minutes = _.isString(options.hash.minutes) ? options.hash.minutes : '% min read';

View file

@ -29,7 +29,7 @@ describe('{{reading_time}} helper', function () {
},
result = helpers.reading_time.call(data);
String(result).should.equal('< 1 min read');
String(result).should.equal('&lt; 1 min read');
});
it('[success] renders reading time for more than one minute text correctly', function () {