Announcement

Collapse
No announcement yet.

mvt vs mvte vs mvta clarification needed

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Brennan
    replied
    Re: mvt vs mvte vs mvta clarification needed

    This is from a different thread but this should help explain the difference:

    Sure, let me expand on what html entities are and I can give you some examples:

    An HTML entity is a different way of writing a html character to the screen. For example the less than character (<) has an html entity of &lt; The broswser sees this entity and knows to print the < character.

    You can read more about html entities here:

    http://www.w3schools.com/html/html_entities.asp

    So in Miva Merchant when we say entity encoded it means that it will take any special character (like the < symbol) and replace it with its html entity equivalent.

    This is very useful for security reasons. Say for example a hacker was trying to run some javascript on your site. If they pasted some javascript contained within a <script></script> tag in the first name field during checkout, on the next page when this value gets written back to the screen if we did not encode it the javascript would execute on the page which is a big security hole.

    Instead we use &mvte: to encode the input so that when it gets written back to the screen the html written would look like this &lt;script&gt; &lt;/script&gt; This would prevent it from being executed on the page.

    mvta works similar but it replaces non url characters (like spaces) with characters that are allowed in urls.

    For example if you had this url:

    http://www.mysite.com/product/my test product.html it would not work because spaces are not allowed in urls.

    Instead we would use mvta to convert the spaces to %20 which is the encoded version of the space. The url would look like this:


    http://www.mysite.com/product/my%20test%20product.html

    Its not pretty but it would allow it to work correctly.

    In Miva Merchant there is a lot of validation in the product urls so it would be hard to even get spaces in the url without doing something custom.

    Hope this helps.

    Leave a comment:


  • sbronstad
    replied
    Re: mvt vs mvte vs mvta clarification needed

    Look in the store morph docs, "working with page templates" in the section "Entry syntax"

    Nutshell:
    mvt: = no encoding
    mvta: = attribute encoded (use for html)
    mvte: = entity encoded (use to show special characters such as '<')

    Leave a comment:


  • oldsportbiker
    started a topic mvt vs mvte vs mvta clarification needed

    mvt vs mvte vs mvta clarification needed

    Can someone point me to a thread or document that explains when I should be using the different forms of mvt in my SMT code?
Working...
X

This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

Accept