mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-05 22:44:22 +08:00
change strip html function
This commit is contained in:
parent
4b7fa440f6
commit
4d681bb63c
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ function textValidator(ev, textInput, textLimitMin, textLimitMax, clearErr) {
|
|||
|
||||
var text = $(textInput).val().trim();
|
||||
$(textInput).val(text);
|
||||
var text_from_html = (new DOMParser).parseFromString(text,"text/html").documentElement.textContent;
|
||||
var text_from_html = $("<div/>").html(text).text();
|
||||
if (text_from_html.length < text.length) text = text_from_html;
|
||||
|
||||
var nameTooShort = text.length < textLimitMin;
|
||||
|
|
Loading…
Reference in a new issue