Fixed tag corruption bug

If there was no newline at the end of the input, then the last tag would get corrupted.
This commit is contained in:
im-mi 2016-08-16 11:25:04 -04:00
parent c946daf152
commit b24977e110

View file

@ -66,7 +66,7 @@ if(document.getElementById("post_tag_string") !== null) {
else if(document.getElementById('tag-sidebar') !== null) {
if (typeof tag !== "ftp://ftp." && chk !==1) {
if(document.location.href.search("sankakucomplex\\.com") >= 0 || document.location.href.search("gelbooru\\.com")){
var tag = document.getElementById('tag-sidebar').innerText.replace(/ /g, "_").replace(/[\?_]*(.*?)_(\(\?\)_)?[0-9]+\n/g, "$1 ");
var tag = document.getElementById('tag-sidebar').innerText.replace(/ /g, "_").replace(/[\?_]*(.*?)_(\(\?\)_)?[0-9]+$/gm, "$1 ");
}else{
var tag = document.getElementById("post_tags").value;
}