[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] using cow

On 23 Dec 2013, at 21:54, Richard Mortier <Richard.Mortier@xxxxxxxxxxxxxxxx> 
> it works for some of the markdown, but there are some things it doesn't help. 
> basically, it stops cow barfing if there are characters like & < > when it 
> parses the input; but cow then escapes these which means the js in the page 
> that parses the markdown can't recognise them.
> eg., `<&>` in a markdown fragment either causes cow to barf (parse error), or 
> if surrounded by CDATA cow turns it into `&lt;&amp;&gt;` in the html returned 
> to the browser, so the js then renders it as the corresponding string literal 
> (in html, "&amp;lt;&amp;amp;&amp;gt;") in a monospaced font. 
> the best i can think of is some way to explicitly tell cow to not parse a 
> chunk of input and leave it "raw". or else i'll have to revert to serving 
> fragments out of files and not use cow at all.

I can't think of anything else immediately that might help, short of an HTML 
parser (which is more permissive about such things than an XML parser).  Could 
you create an issue on https://github.com/mirage/ocaml-cow/issues about this so 
we don't forget?

In the meanwhile, serving it from files like we used to sounds fine to me...

MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.