"encoding" Snippets


Basket #25606

[Documentation](http://www.miva.com/template-language/miva_template_language/entities_&_encoding.html) [Video Tutorial](http://www.miva.com/videos/web_developers/output-encoding)
Created: 1476732650
View "Basket #25606"
<mvt:assign name="l.settings:example:list[1]" value="'Bananas'" /> <mvt:assign name="l.settings:example:list[2]" value="'Milk'" /> <mvt:assign name="l.settings:example:list[3]" value="'Bread'" /> <mvt:assign name="l.settings:example:list[4]" value="'Cereal'" /> <h4>Before:</h4> <mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:example), ',', '<br>'))" /> <mvt:foreach iterator="item" array="example:list"> <mvt:if expr="l.settings:item EQ 'Milk'"> <mvt:assign name="l.result" value="miva_array_delete( l.settings:example:list, l.POS1, 1 )" /> </mvt:if> </mvt:foreach> <h4>After:</h4> <mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:example), ',', '<br>'))" />
 

Basket #15324

[Documentation](http://www.miva.com/template-language/miva_template_language/entities_&_encoding.html) [Video Tutorial](http://www.miva.com/videos/web_developers/output-encoding)
Created: 1458616989
View "Basket #15324"
<mvt:assign name="l.settings:sample" value="'<i>Hello World.</i>'" /> <h2>No Encoding</h2> &mvt:sample; <h2>Entity Encoding </h2> <p><medium>Can help prevent cross side scripiting</medium></p> &mvte:sample; <h2>Attribute Encoding </h2> <p><small>Great WHAT URLs</small></p> &mvta:sample; <mvt:comment> <!-- Click the Result's "View Source" Button for more details. --> </mvt:comment> <H1>WHAT</H1>
 

Basket #474

[Documentation](http://www.miva.com/template-language/miva_template_language/entities_&_encoding.html) [Video Tutorial](http://www.miva.com/videos/web_developers/output-encoding)
Created: 1427727106
View "Basket #474"
<mvt:assign name="g.test" value="1+1"/> &mvt:global:test;
 

Snippet: 1427689534 - v1

[Documentation](http://www.miva.com/template-language/miva_template_language/entities_&_encoding.html) [Video Tutorial](http://www.miva.com/videos/web_developers/output-encoding)
Created: 1427689534
View "Snippet: 1427689534 - v1"
<mvt:while expr="g.counter LT 10"> <mvt:assign name="g.counter" value="g.counter + 1" /> &mvte:global:counter;<br> </mvt:while><mvt:while expr="g.counter LT 10"> <mvt:assign name="g.counter" value="g.counter + 1" /> &mvte:global:counter;<br> </mvt:while><mvt:eval expr="2 + 2" /><mvt:assign name="l.settings:sample" value="'<i>Hello World.</i>'" /> <h2>No Encoding</h2> &mvt:sample; <h2>Entity Encoding </h2> <p><small>Can help prevent cross side scripiting</small></p> &mvte:sample; <h2>Attribute Encoding </h2> <p><small>Great for URLs</small></p> &mvta:sample; <mvt:comment> <!-- Click the Result's "View Source" Button for more details. --> </mvt:comment> <mvt:while expr="g.counter LT 10"> <mvt:assign name="g.counter" value="g.counter + 1" /> &mvte:global:counter;<br> </mvt:while><mvt:while expr="g.counter LT 10"> <mvt:assign name="g.counter" value="g.counter + 1" /> &mvte:global:counter;<br> </mvt:while><mvt:while expr="g.counter LT 10"> <mvt:assign name="g.counter" value="g.counter + 1" /> &mvte:global:counter;<br> </mvt:while>
 

Output Encoding

[Documentation](http://www.miva.com/template-language/miva_template_language/entities_&_encoding.html) [Video Tutorial](http://www.miva.com/videos/web_developers/output-encoding)
Created: 1427238108
View "Output Encoding"
<mvt:assign name="l.settings:sample" value="'<i>Hello World.</i>'" /> <h2>No Encoding</h2> &mvt:sample; <h2>Entity Encoding </h2> <p><small>Can help prevent cross side scripiting</small></p> &mvte:sample; <h2>Attribute Encoding </h2> <p><small>Great for URLs</small></p> &mvta:sample; <h2>JavaScript Encoding</h2> &mvtj:sample; <h2>Sluggified Encoding</h2> &mvts:sample; <mvt:comment> <!-- Click the Result's "View Source" Button for more details. --> </mvt:comment>