aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-11 12:32:19 -0800
committerzotlabs <mike@macgirvin.com>2017-01-11 12:32:19 -0800
commit62ad4dd1094905f1c55b3eb85bebce2402c990db (patch)
treec8eb99739060b9484a9d4bb92a13f31a179d5487
parent41dc40dd84388cae3e8188d8fe41f75404a8259f (diff)
parent2fc47cc52b556153a17b5712e695175f87e6c1dd (diff)
downloadvolse-hubzilla-62ad4dd1094905f1c55b3eb85bebce2402c990db.tar.gz
volse-hubzilla-62ad4dd1094905f1c55b3eb85bebce2402c990db.tar.bz2
volse-hubzilla-62ad4dd1094905f1c55b3eb85bebce2402c990db.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
-rw-r--r--include/photos.php1
-rwxr-xr-xview/tpl/jot-header.tpl5
-rw-r--r--view/tpl/wiki.tpl5
3 files changed, 7 insertions, 4 deletions
diff --git a/include/photos.php b/include/photos.php
index 5e4d755e3..8496c2c86 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -480,6 +480,7 @@ function photos_albums_list($channel, $observer, $sort_key = 'album', $direction
foreach($albums as $k => $album) {
$entry = array(
'text' => (($album['album']) ? $album['album'] : '/'),
+ 'jstext' => (($album['album']) ? addslashes($album['album']) : '/'),
'total' => $album['total'],
'url' => z_root() . '/photos/' . $channel['channel_address'] . '/album/' . bin2hex($album['album']),
'urlencode' => urlencode($album['album']),
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);
}