escape apostrophes in prefix/suffix on move existing which fixes BUG-116

This commit is contained in:
2023-01-13 17:22:26 +11:00
parent 1679e79165
commit 1ed4a0f25d
2 changed files with 5 additions and 3 deletions

View File

@@ -60,7 +60,10 @@ function GetExistingDirsAsDiv( dt, divname, ptype )
else
vis = ''
s+= '<button class="btn btn-outline-primary move_'+item.ptype+ ' ' + vis + '" '
s+= 'onClick="$(\'#prefix\').val(\''+item.prefix+'\'); $(\'#suffix\').val(\''+item.suffix+'\');return false;">'+item.prefix+item.suffix+'</button>'
s+= 'onClick="$(\'#prefix\').val(\''+item.prefix.replace("\'","\\\'")+'\'); '
s+='$(\'#suffix\').val(\''+item.suffix.replace("\'","\\\'")+'\');return false;">'
s+=item.prefix+item.suffix
s+='</button>'
} )
if( s == '' )
$('#existing').html('')