-
Hi How can I url encode a url with mavo? Does mavo have a function for it? Let's say I have a property value which is: and I want it to become like this: |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 14 replies
-
For now, there is no way to do it, unfortunately. However, there is an open issue #762 about that. So, feel free to share your thoughts and usecases there. |
Beta Was this translation helpful? Give feedback.
-
the same way @LeaVerou is using on her demo: html _ & javascript_
Isn't there a way to use the javascript function called Without knowing javascript I tried
doesn't work, maybe it needs something between ( and ) Or is this a totally wrong way? :( |
Beta Was this translation helpful? Give feedback.
-
It SUPER helps ! Thank you so much @DmitrySharabin Wow ...even more simple than I thought I ❤️ Mavo :) |
Beta Was this translation helpful? Give feedback.
-
We may have removed this because there's been some discussion of *not*
allowing arbitrary js in mavo expressions?
…On 6/28/2022 7:48 PM, Dmitry Sharabin wrote:
I would swear it was mentioned somewhere in the docs but I cannot
find it. @DmitrySharabin <https://github.com/DmitrySharabin> do
you remember where it is? And if it's not there, we should
/definitely/ mention it!
You are absolutely right. There was a mention in the docs before we
released v0.2.2 (as @GalinhaLX <https://github.com/GalinhaLX>
mentioned). I checked the commits to the docs. Those are the ones with
the corresponding changes: ***@***.***
<mavoweb/mavo.io@4fb0087>
and ***@***.***
<mavoweb/mavo.io@803af57>.
In those commits we removed the following sentences from two sections
in the docs:
1. If a Mavo expression is more advanced than MavoScript, it is
automatically parsed as JavaScript, allowing experienced web
developers to do more with Mavo expressions.
2. Since MavoScript does not support comments, an easy way to force
JS mode is a |/* js */| comment in the start or end of the expression.
What do you think if we add something like this?
*If you need something more advanced, you can invoke custom JavaScript
functions (both synchronous and asynchronous) in your expressions.
Function calls are perfectly valid MavoScript.*
We can add it after the table here
<https://mavo.io/docs/mavoscript#mavoscript-vs-javascript> and here
<https://mavo.io/docs/expressions#mavoscript-vs-javascript>. Or
anywhere else?
Thoughts?
—
Reply to this email directly, view it on GitHub
<#859 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIWSXSZMHVS272CPUEDQD3VRMUHTANCNFSM5XBTXIMA>.
You are receiving this because you are subscribed to this
thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
lets do this |
Beta Was this translation helpful? Give feedback.
the same way @LeaVerou is using on her demo:
html
<a property="url">[getWebsite(url)]</a>
_ & javascript_
Isn't there a way to use the javascript function called
encodeURIComponent()
?Without knowing javascript I tried
doesn't work, maybe it needs something between ( and )
Or is this a totally wrong way? :(