diff --git a/js/templates.js b/js/templates.js index fc4b6ae65..83b3e7045 100644 --- a/js/templates.js +++ b/js/templates.js @@ -38,7 +38,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.6.1'; + var VERSION = '4.11.2'; /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; @@ -128,7 +128,8 @@ var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -145,12 +146,35 @@ /*------------------------------------------------------------------------*/ + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /*------------------------------------------------------------------------*/ + /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -177,9 +201,11 @@ * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isSymbol(Symbol.iterator); @@ -194,11 +220,12 @@ } /** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {string} Returns the string. @@ -214,18 +241,7 @@ * // => '1,2,3' */ function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return value == null ? '' : baseToString(value); } /*------------------------------------------------------------------------*/ @@ -239,20 +255,22 @@ * * Though the ">" character is escaped for symmetry, characters like * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. - * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) * (under "semi-related fun fact") for more details. * * Backticks are escaped because in IE < 9, they can break out of * attribute values or HTML comments. See [#59](https://html5sec.org/#59), * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) - * for more details. + * [#133](https://html5sec.org/#133) of the + * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details. * - * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) - * to reduce XSS vectors. + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. * * @static + * @since 0.1.0 * @memberOf _ * @category String * @param {string} [string=''] The string to escape. diff --git a/languages/yoast-seo.pot b/languages/yoast-seo.pot index 5496c5b47..12446aacf 100644 --- a/languages/yoast-seo.pot +++ b/languages/yoast-seo.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: yoastseo 1.2.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-04-21 13:46+0200\n" +"POT-Creation-Date: 2016-05-04 16:56+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -225,22 +225,22 @@ msgstr "" msgid "No images appear in this page, consider adding some as appropriate." msgstr "" -#: js/assessments/textImagesAssessment.js:31 -msgid "The images on this page are missing alt attributes." -msgstr "" - -#: js/assessments/textImagesAssessment.js:39 -msgid "The images on this page contain alt attributes." +#: js/assessments/textImagesAssessment.js:32 +msgid "The images on this page contain alt attributes with the focus keyword." msgstr "" -#: js/assessments/textImagesAssessment.js:47 +#: js/assessments/textImagesAssessment.js:40 msgid "" "The images on this page do not have alt attributes containing your focus " "keyword." msgstr "" -#: js/assessments/textImagesAssessment.js:55 -msgid "The images on this page contain alt attributes with the focus keyword." +#: js/assessments/textImagesAssessment.js:48 +msgid "The images on this page contain alt attributes." +msgstr "" + +#: js/assessments/textImagesAssessment.js:56 +msgid "The images on this page are missing alt attributes." msgstr "" #: js/assessments/textLengthAssessment.js:17