Skip to content
This repository was archived by the owner on Mar 7, 2022. It is now read-only.

Commit e7dab61

Browse files
committed
encodeURI(data.text) to encodeURIComponent(data.text) everywhere
1 parent 55b4693 commit e7dab61

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/js/angular-socialshare.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,35 +171,35 @@
171171
}
172172

173173
$window.open(
174-
urlString + encodeURIComponent(data.url || $location.absUrl()) + '&title=' + encodeURI(data.text)
174+
urlString + encodeURIComponent(data.url || $location.absUrl()) + '&title=' + encodeURIComponent(data.text)
175175
, 'sharer', 'toolbar=0,status=0,width=' + data.popupWidth + ',height=' + data.popupHeight);
176176
};
177177

178178
$scope.stumbleuponShare = function manageStumbleuponShare(data) {
179179

180180
$window.open(
181-
'https://www.stumbleupon.com/submit?url=' + encodeURIComponent(data.url || $location.absUrl()) + '&title=' + encodeURI(data.text)
181+
'https://www.stumbleupon.com/submit?url=' + encodeURIComponent(data.url || $location.absUrl()) + '&title=' + encodeURIComponent(data.text)
182182
, 'sharer', 'toolbar=0,status=0,width=' + data.popupWidth + ',height=' + data.popupHeight);
183183
};
184184

185185
$scope.linkedinShare = function manageLinkedinShare(data) {
186186

187187
$window.open(
188-
'https://www.linkedin.com/shareArticle?mini=true&url=' + encodeURIComponent(data.url || $location.absUrl()) + '&title=' + encodeURI(data.text)
188+
'https://www.linkedin.com/shareArticle?mini=true&url=' + encodeURIComponent(data.url || $location.absUrl()) + '&title=' + encodeURIComponent(data.text)
189189
, 'sharer', 'toolbar=0,status=0,width=' + data.popupWidth + ',height=' + data.popupHeight);
190190
};
191191

192192
$scope.pinterestShare = function managePinterestShare(data) {
193193

194194
$window.open(
195-
'https://www.pinterest.com/pin/create/button/?url=' + encodeURIComponent(data.url || $location.absUrl()) + '&media=' + encodeURI(data.media) + '&description=' + encodeURI(data.text)
195+
'https://www.pinterest.com/pin/create/button/?url=' + encodeURIComponent(data.url || $location.absUrl()) + '&media=' + encodeURI(data.media) + '&description=' + encodeURIComponent(data.text)
196196
, 'sharer', 'toolbar=0,status=0,width=' + data.popupWidth + ',height=' + data.popupHeight);
197197
};
198198

199199
$scope.diggShare = function manageDiggShare(data) {
200200

201201
$window.open(
202-
'https://www.digg.com/submit?url=' + encodeURIComponent(data.url || $location.absUrl()) + '&title=' + encodeURI(data.text)
202+
'https://www.digg.com/submit?url=' + encodeURIComponent(data.url || $location.absUrl()) + '&title=' + encodeURIComponent(data.text)
203203
, 'sharer', 'toolbar=0,status=0,width=' + data.popupWidth + ',height=' + data.popupHeight);
204204
};
205205

@@ -209,7 +209,7 @@
209209
var urlString = 'https://www.tumblr.com/share/photo?source=' + encodeURIComponent(data.media);
210210

211211
if (data.text) {
212-
urlString += '&caption=' + encodeURI(data.text);
212+
urlString += '&caption=' + encodeURIComponent(data.text);
213213
}
214214

215215
$window.open(
@@ -218,7 +218,7 @@
218218
} else {
219219

220220
$window.open(
221-
'https://www.tumblr.com/share/link?url=' + encodeURIComponent(data.url) + '&description=' + encodeURI(data.text)
221+
'https://www.tumblr.com/share/link?url=' + encodeURIComponent(data.url) + '&description=' + encodeURIComponent(data.text)
222222
, 'sharer', 'toolbar=0,status=0,width=' + data.popupWidth + ',height=' + data.popupHeight);
223223
}
224224
};
@@ -233,7 +233,7 @@
233233
$scope.deliciousShare = function manageDeliciousShare(data) {
234234

235235
$window.open(
236-
'https://www.delicious.com/save?v=5&noui&jump=close&url=' + encodeURIComponent(data.url || $location.absUrl()) + '&title=' + encodeURI(data.text)
236+
'https://www.delicious.com/save?v=5&noui&jump=close&url=' + encodeURIComponent(data.url || $location.absUrl()) + '&title=' + encodeURIComponent(data.text)
237237
, 'sharer', 'toolbar=0,status=0,width=' + data.popupWidth + ',height=' + data.popupHeight);
238238
};
239239

0 commit comments

Comments
 (0)