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

3
BUGs
View File

@@ -1,4 +1,4 @@
### Next: 116 ### Next: 117
BUG-100: I managed to get 2 photos matching mich in the NOT_WORKING photo (probably dif refimgs but same p.tag?) BUG-100: I managed to get 2 photos matching mich in the NOT_WORKING photo (probably dif refimgs but same p.tag?)
= /photos/2012/20120414-damien/IMG_8467.JPG = /photos/2012/20120414-damien/IMG_8467.JPG
BUG-106: cant add trudy /pat? as refimgs via FaceDBox BUG-106: cant add trudy /pat? as refimgs via FaceDBox
@@ -6,4 +6,3 @@ BUG-106: cant add trudy /pat? as refimgs via FaceDBox
(it came from a face bbox, BUT, I have grown the face seln by 10%?) (it came from a face bbox, BUT, I have grown the face seln by 10%?)
BUG-109: add mich force override, removed it, then re-added it, then rebuild DB form scratch and metadata has a duplicate BUG-109: add mich force override, removed it, then re-added it, then rebuild DB form scratch and metadata has a duplicate
- redo disco metadata with md5 not UUID of face dataS - redo disco metadata with md5 not UUID of face dataS
BUG-116: apostrophes in existing paths crashs

View File

@@ -60,7 +60,10 @@ function GetExistingDirsAsDiv( dt, divname, ptype )
else else
vis = '' vis = ''
s+= '<button class="btn btn-outline-primary move_'+item.ptype+ ' ' + 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 == '' ) if( s == '' )
$('#existing').html('') $('#existing').html('')