David-Sarah Hopwood wrote:
> Here are the rules that I am hoping to use for Jacaranda 0.4 in order
> to allow it to be embedded in a <script> tag (in either HTML or XHTML).
> Assuming that the character encoding is correct and is UTF-8 or UTF-16,
> do you know of any other reason why these might not be sufficient?
> 
>    A Jacaranda source text MUST NOT contain the sequences of unescaped
>    code units «]]>» or «</», or an initial subsequence of these at the
>    end of the text.
> 
>    A Jacaranda source text MUST NOT contain the code unit «&» unless
>    immediately followed by «&», «=», «(», «+», «-», «!», «~», «'», «"»,
>    «/», «\», <DecimalDigit>, <WhiteSpace>, or <LineTerminator>.
>    (If followed by «&», the same restriction applies to the next code
>    unit.)

I should have pointed out that this is in addition to disallowing all
non-BMP characters, ASCII controls other than TAB, CR and LF, and
format control characters (otherwise there are obvious problems with
browsers filtering characters before parsing).

-- 
David-Sarah Hopwood ⚥

Reply via email to