.replace vs .replaceAll; On ya unit tests (need more of these)
This commit is contained in:
@ -162222,7 +162222,7 @@ var decodeUri = function decodeUri() {
|
|||||||
uri = uri.replace(/,/g, '%2C');
|
uri = uri.replace(/,/g, '%2C');
|
||||||
uri = uri.replace(/ /g, '%20'); // Re-encode any accented characters. Most Mopidy backends expect encoding of these.
|
uri = uri.replace(/ /g, '%20'); // Re-encode any accented characters. Most Mopidy backends expect encoding of these.
|
||||||
|
|
||||||
uri = uri.replaceAll(/[À-ÖØ-öø-ÿ]/g, function (_char) {
|
uri = uri.replace(/[À-ÖØ-öø-ÿ]/g, function (_char) {
|
||||||
return encodeURIComponent(_char);
|
return encodeURIComponent(_char);
|
||||||
});
|
});
|
||||||
return uri;
|
return uri;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
mopidy_iris/static/app.min.js
vendored
2
mopidy_iris/static/app.min.js
vendored
File diff suppressed because one or more lines are too long
@ -106,7 +106,7 @@
|
|||||||
|
|
||||||
// Release details
|
// Release details
|
||||||
// These are automatically injected to built HTML
|
// These are automatically injected to built HTML
|
||||||
var build = "1616484495";
|
var build = "1616484761";
|
||||||
var version = "3.57.1";
|
var version = "3.57.1";
|
||||||
|
|
||||||
// Construct the script tag
|
// Construct the script tag
|
||||||
|
|||||||
@ -333,7 +333,7 @@ const decodeUri = (rawUri = '') => {
|
|||||||
uri = uri.replace(/ /g, '%20');
|
uri = uri.replace(/ /g, '%20');
|
||||||
|
|
||||||
// Re-encode any accented characters. Most Mopidy backends expect encoding of these.
|
// Re-encode any accented characters. Most Mopidy backends expect encoding of these.
|
||||||
uri = uri.replaceAll(/[À-ÖØ-öø-ÿ]/g, (char) => encodeURIComponent(char));
|
uri = uri.replace(/[À-ÖØ-öø-ÿ]/g, (char) => encodeURIComponent(char));
|
||||||
|
|
||||||
return uri;
|
return uri;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user