I've got a page dedicated as a handler for AJAX, returning wanted values in JSON - yes, the page has the http_headers item assigned to it and returns a Content-Type of "application/json". Using Weiland's Toolkit, I'd like to have one response contain HTML to replace an element on the page, so I've done this:
When I run the URL for this page through this validator, it says there's invalid characters in the member containing the HTML. I assume it's the line breaks in the string, and tried to remove them by doing this:
But the output isn't changed at all. Is there some way to remove line breaks from a string using store morph items or MivaScript that I'm not aware about?
Code:
<mvt:item name="toolkit" param="mvassign|url|'http://' $ g.domain:name $ '/MINICART.html'"/> <mvt:item name="toolkit" param="vcallurl|carthtml|g.url|get|g.session_id"/> <mvt:item name="toolkit" param="mvassign|carthtml|encodeentities(g.carthtml)"/>
Code:
<mvt:item name="toolkit" param="mvassign|url|'http://' $ g.domain:name $ '/MINICART.html'"/> <mvt:item name="toolkit" param="vcallurl|carthtml|g.url|get|g.session_id"/> <mvt:item name="toolkit" param="mvassign|carthtml|glosub(g.carthtml,asciichar(12),'')"/> <mvt:item name="toolkit" param="mvassign|carthtml|glosub(g.carthtml,asciichar(15),'')"/> <mvt:item name="toolkit" param="mvassign|carthtml|encodeentities(g.carthtml)"/>
Comment