weizhouapache commented on code in PR #8791:
URL: https://github.com/apache/cloudstack/pull/8791#discussion_r1526218947


##########
ui/src/utils/plugins.js:
##########
@@ -490,8 +499,7 @@ export const genericUtilPlugin = {
     }
 
     app.config.globalProperties.$toBase64AndURIEncoded = function (text) {
-      const base64regex = 
/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/
-      if (base64regex.test(text)) {
+      if (isBase64(text)) {

Review Comment:
   @Pearl1594 
   I think the logic can be simple as below
   - if checkbox is ticked, pass the origin input
   - if checkbox is not ticked, (Base64AndURI) encode the input and pass to API



-- 
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