aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-01-11 10:59:46 +0100
committerMario Vavti <mario@mariovavti.com>2017-01-11 10:59:46 +0100
commit2fc47cc52b556153a17b5712e695175f87e6c1dd (patch)
tree7afb83e60dfdd3758fbd1794956733dea0c2e1f8 /view/tpl
parent9ad44a2060b9f294423376f1fad43fa17d1dffe4 (diff)
downloadvolse-hubzilla-2fc47cc52b556153a17b5712e695175f87e6c1dd.tar.gz
volse-hubzilla-2fc47cc52b556153a17b5712e695175f87e6c1dd.tar.bz2
volse-hubzilla-2fc47cc52b556153a17b5712e695175f87e6c1dd.zip
fix embedimage if an albumname contains quotes
Diffstat (limited to 'view/tpl')
-rwxr-xr-xview/tpl/jot-header.tpl5
-rw-r--r--view/tpl/wiki.tpl5
2 files changed, 6 insertions, 4 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index edabee2da..d846f3e34 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -490,8 +490,9 @@ function enableOnUser(){
$('#embedPhotoModalBodyAlbumList').html('<ul class="nav"></ul>');
for(var i=0; i<albums.length; i++) {
var albumName = albums[i].text;
- var albumLink = '<li>';
- albumLink += '<a href="#" onclick="choosePhotoFromAlbum(\'' + albumName + '\');return false;">' + albumName + '</a>';
+ var jsAlbumName = albums[i].jstext;
+ var albumLink = '<li>';
+ albumLink += '<a href="#" onclick="choosePhotoFromAlbum(\'' + jsAlbumName + '\'); return false;">' + albumName + '</a>';
albumLink += '</li>';
$('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink);
}
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl
index 8ad010168..af6b6800e 100644
--- a/view/tpl/wiki.tpl
+++ b/view/tpl/wiki.tpl
@@ -427,10 +427,11 @@
var albums = data['albumlist']; //JSON.parse(data['albumlist']);
$('#embedPhotoModalLabel').html("{{$modalchoosealbum}}");
$('#embedPhotoModalBodyAlbumList').html('<ul class="nav"></ul>');
- for(var i=0; i<albums.length; i++) {
+ for(var i = 0; i < albums.length; i++) {
var albumName = albums[i].text;
+ var jsAlbumName = albums[i].jstext;
var albumLink = '<li>';
- albumLink += '<a href="#" onclick="choosePhotoFromAlbum("' + albumName + '");return false;">' + albumName + '</a>';
+ albumLink += '<a href="#" onclick="choosePhotoFromAlbum(\'' + jsAlbumName + '\'); return false;">' + albumName + '</a>';
albumLink += '</li>';
$('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink);
}