shwstppr commented on code in PR #7749:
URL: https://github.com/apache/cloudstack/pull/7749#discussion_r1269133770


##########
ui/src/utils/plugins.js:
##########
@@ -484,6 +484,14 @@ export const genericUtilPlugin = {
       const regexExp = 
/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi
       return regexExp.test(uuid)
     }
+
+    app.config.globalProperties.$toBase64Encoded = function (text) {
+      const base64regex = 
/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/
+      if (base64regex.test(text)) {
+        return text

Review Comment:
   @weizhouapache refactored



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to