Skip to content

Commit 55483e4

Browse files
committed
These are URI components; fixes comma decoding
1 parent efa2c19 commit 55483e4

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

www/secretary/workbench/views/parts.js.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def hideMenu(event)
587587
# burst a PDF into individual pages
588588
def burst(_event)
589589
data = {
590-
selected: @menu || decodeURI(@selected),
590+
selected: @menu || decodeURIComponent(@selected),
591591
message: window.parent.location.pathname
592592
}
593593

@@ -606,7 +606,7 @@ def burst(_event)
606606
# join a PDF from individual pages
607607
def join(_event)
608608
data = {
609-
selected: @menu || decodeURI(@selected),
609+
selected: @menu || decodeURIComponent(@selected),
610610
message: window.parent.location.pathname
611611
}
612612

@@ -650,7 +650,7 @@ def undelete_message(event)
650650
# delete an attachment
651651
def delete_attachment(event)
652652
data = {
653-
selected: @menu || decodeURI(@selected),
653+
selected: @menu || decodeURIComponent(@selected),
654654
message: window.parent.location.pathname
655655
}
656656

@@ -678,7 +678,7 @@ def delete_attachment(event)
678678
# revert to the original
679679
def revert(_event)
680680
data = {
681-
selected: @menu || decodeURI(@selected),
681+
selected: @menu || decodeURIComponent(@selected),
682682
message: window.parent.location.pathname
683683
}
684684

@@ -702,7 +702,7 @@ def rotate_attachment(event)
702702
message = window.parent.location.pathname
703703

704704
data = {
705-
selected: @menu || decodeURI(@selected),
705+
selected: @menu || decodeURIComponent(@selected),
706706
message: message,
707707
direction: event.currentTarget.textContent
708708
}
@@ -726,7 +726,7 @@ def pdfize(_event)
726726
message = window.parent.location.pathname
727727

728728
data = {
729-
selected: @menu || decodeURI(@selected),
729+
selected: @menu || decodeURIComponent(@selected),
730730
message: message
731731
}
732732

@@ -747,7 +747,7 @@ def pdfize(_event)
747747
# parse pdf and display extracted data
748748
def pdfparse(_event)
749749
message = window.parent.location.pathname
750-
attachment = @menu || decodeURI(@selected)
750+
attachment = @menu || decodeURIComponent(@selected)
751751
url = message.sub('/workbench/','/icla-parse/') + attachment
752752
window.parent.frames.content.location.href = url
753753
end
@@ -906,8 +906,8 @@ def drop(event)
906906
event.preventDefault()
907907

908908
data = {
909-
source: decodeURI(@drag.split('/').pop()),
910-
target: decodeURI(href.split('/').pop()),
909+
source: decodeURIComponent(@drag.split('/').pop()),
910+
target: decodeURIComponent(href.split('/').pop()),
911911
message: window.parent.location.pathname
912912
}
913913

0 commit comments

Comments
 (0)