Merge branch '5.99' into 6.0
This commit is contained in:
@@ -1,27 +1,11 @@
|
||||
jasmineRequire.HtmlSpecFilter = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @name HtmlSpecFilter
|
||||
* @classdesc Legacy HTML spec filter, for backward compatibility
|
||||
* with boot files that predate {@link HtmlExactSpecFilter}.
|
||||
* @param options Object with a filterString method
|
||||
* @constructor
|
||||
* @deprecated
|
||||
* @since 1.2.0
|
||||
*/
|
||||
// Legacy HTML spec filter, preserved for backward compatibility with
|
||||
// boot files that predate HtmlExactSpecFilterV2
|
||||
function HtmlSpecFilter(options) {
|
||||
let filterString = (options && options.filterString()) || '';
|
||||
|
||||
if (filterString.startsWith('[')) {
|
||||
// Convert an HtmlExactSpecFilterV2 string into something we can use
|
||||
filterString = JSON.parse(filterString).join(' ');
|
||||
}
|
||||
|
||||
filterString = filterString.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
||||
|
||||
const filterString =
|
||||
options &&
|
||||
options.filterString() &&
|
||||
options.filterString().replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
||||
const filterPattern = new RegExp(filterString);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user