Hopefully fix encoding issues
This commit is contained in:
parent
65ab7f2941
commit
c3c220753f
|
@ -74,19 +74,19 @@ else {
|
|||
}
|
||||
|
||||
function copy_hash_np() {
|
||||
copyToClipboard('[#np](@Log.NowPlayingUrl) @Model.CopyArtist - @Model.CopyAlbum');
|
||||
copyToClipboard('[#np](@Html.Raw(Log.NowPlayingUrl)) @Html.Raw(Model.CopyArtist) - @Html.Raw(Model.CopyAlbum)');
|
||||
reset_copy_labels();
|
||||
document.getElementById('copy_hash_np').innerText = 'Copy #np (Copied!)';
|
||||
}
|
||||
|
||||
function copy_journal_full() {
|
||||
copyToClipboard('[@Model.CopyArtist](' + getUrl('@Model.LogArtist') + ') - [@Model.CopyAlbum](' + getUrl('@Model.LogArtist', '@Model.LogAlbum') + ')')
|
||||
copyToClipboard('[@Html.Raw(Model.CopyArtist)](' + getUrl('@Html.Raw(Model.LogArtist)') + ') - [@Html.Raw(Model.CopyAlbum)](' + getUrl('@Html.Raw(Model.LogArtist)', '@Html.Raw(Model.LogAlbum)') + ')')
|
||||
reset_copy_labels();
|
||||
document.getElementById('copy_journal_full').innerText = 'Copy journal (full) (Copied!)';
|
||||
}
|
||||
|
||||
function copy_journal_album() {
|
||||
copyToClipboard(', [@Model.CopyAlbum](' + getUrl('@Model.LogArtist', '@Model.LogAlbum') + ')')
|
||||
copyToClipboard(', [@Html.Raw(Model.CopyAlbum)](' + getUrl('@Html.Raw(Model.LogArtist)', '@Html.Raw(Model.LogAlbum)') + ')')
|
||||
reset_copy_labels();
|
||||
document.getElementById('copy_journal_album').innerText = 'Copy journal (album only) (Copied!)';
|
||||
}
|
||||
|
|
|
@ -52,11 +52,11 @@ namespace webmusic.Pages {
|
|||
if (Log.StatisticsEnabled && Request.Headers["Remote-User"].Equals(Log.StatisticsUser) && Files.Any()) {
|
||||
var pathparts = Displaypath.Split(System.IO.Path.DirectorySeparatorChar);
|
||||
if (pathparts.Length > 2) {
|
||||
CopyAlbum = pathparts[Index.FromEnd(1)];
|
||||
CopyArtist = pathparts[Index.FromEnd(2)];
|
||||
LogAlbum = HttpUtility.UrlPathEncode(pathparts[Index.FromEnd(1)]);
|
||||
LogArtist = HttpUtility.UrlPathEncode(pathparts[Index.FromEnd(2)]);
|
||||
LogUrl = Request.GetEncodedUrl();
|
||||
CopyAlbum = pathparts[Index.FromEnd(1)].Replace("'", "\\'");
|
||||
CopyArtist = pathparts[Index.FromEnd(2)].Replace("'", "\\'");;
|
||||
LogAlbum = HttpUtility.UrlPathEncode(pathparts[Index.FromEnd(1)]).Replace("'", "\\'");;
|
||||
LogArtist = HttpUtility.UrlPathEncode(pathparts[Index.FromEnd(2)]).Replace("'", "\\'");;
|
||||
LogUrl = Request.GetEncodedUrl().Replace("'", "\\'");;
|
||||
LogConditionsMet = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue