|
@@ -84,13 +84,13 @@ export const text2Url = selectors => {
|
|
|
* @return {*|jQuery}
|
|
* @return {*|jQuery}
|
|
|
*/
|
|
*/
|
|
|
export const htmlEncode = value => {
|
|
export const htmlEncode = value => {
|
|
|
- return $('<div/>')
|
|
|
|
|
|
|
+ return $('<div></div>')
|
|
|
.text(value)
|
|
.text(value)
|
|
|
.html();
|
|
.html();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export const html2text = value => {
|
|
export const html2text = value => {
|
|
|
- return $('<div/>')
|
|
|
|
|
|
|
+ return $('<div></div>')
|
|
|
.html(value)
|
|
.html(value)
|
|
|
.text()
|
|
.text()
|
|
|
.replace(/\u00A0/g, ' ');
|
|
.replace(/\u00A0/g, ' ');
|
|
@@ -261,7 +261,7 @@ export const waitForVariable = (variable, callback, timeout) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export const scrollbarWidth = () => {
|
|
export const scrollbarWidth = () => {
|
|
|
- const $parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo(
|
|
|
|
|
|
|
+ const $parent = $('<div style="width:50px;height:50px;overflow:auto"><div></div></div>').appendTo(
|
|
|
'body'
|
|
'body'
|
|
|
);
|
|
);
|
|
|
const $children = $parent.children();
|
|
const $children = $parent.children();
|