Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Adopts Prezi URL check to match default share links.

paweldomas2cbdc43e7893
diff --git a/prezi.js b/prezi.js
index 4800f5d34d..8e2d988ce9 100644
--- a/prezi.js
+++ b/prezi.js
@@ -112,7 +112,7 @@ var Prezi = (function (my) {
else {
var presIdTmp = urlValue.substring(
urlValue.indexOf("prezi.com/") + 10);
- if (!Util.isAlphanumeric(presIdTmp)
+ if (!isAlphanumeric(presIdTmp)
|| presIdTmp.indexOf('/') < 2) {
$.prompt.goToState('state1');
return false;
@@ -258,6 +258,16 @@ var Prezi = (function (my) {
}
};
+ /**
+ * Indicates if the given string is an alphanumeric string.
+ * Note that some special characters are also allowed (-, _ , /, &, ?, =, ;) for the
+ * purpose of checking URIs.
+ */
+ function isAlphanumeric(unsafeText) {
+ var regex = /^[a-z0-9-_\/&\?=;]+$/i;
+ return regex.test(unsafeText);
+ }
+
/**
* Returns the presentation id from the given url.
*/
diff --git a/util.js b/util.js
index b2f6d2ed23..8363c869b5 100644
--- a/util.js
+++ b/util.js
@@ -46,17 +46,6 @@ var Util = (function (my) {
return $('<div/>').text(unsafeText).html();
};
- /**
- * Indicates if the given string is an alphanumeric string.
- * Note that some special characters are also allowed (-, _ , /) for the
- * purpose of checking URIs. (FIXME: This should maybe moved to another not
- * so generic method in the future.)
- */
- my.isAlphanumeric = function(unsafeText) {
- var regex = /^[a-z0-9-_\/]+$/i;
- return regex.test(unsafeText);
- };
-
/**
* Returns the available video width.
*/