From 63aeebb1445a707e853e9e0025f7e5906c59af37 Mon Sep 17 00:00:00 2001 From: Vikas Potluri Date: Sun, 18 Mar 2018 21:47:58 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20escaping=20`<`=20in=20re?= =?UTF-8?q?ading=20time=20helper=20(#9508)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit no issue Using the < character raw isn't w3 complaint --- core/server/helpers/reading_time.js | 2 +- core/test/unit/helpers/reading_time_spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/server/helpers/reading_time.js b/core/server/helpers/reading_time.js index 171389334d..691f401f4d 100644 --- a/core/server/helpers/reading_time.js +++ b/core/server/helpers/reading_time.js @@ -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 : '< 1 min read', minute = _.isString(options.hash.minute) ? options.hash.minute : '1 min read', minutes = _.isString(options.hash.minutes) ? options.hash.minutes : '% min read'; diff --git a/core/test/unit/helpers/reading_time_spec.js b/core/test/unit/helpers/reading_time_spec.js index b0b34a39f5..00008eab16 100644 --- a/core/test/unit/helpers/reading_time_spec.js +++ b/core/test/unit/helpers/reading_time_spec.js @@ -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('< 1 min read'); }); it('[success] renders reading time for more than one minute text correctly', function () {