vehre / aspa_cscc

Convert ASP pages to "pure" html/JS/PHP pages. Based on ASPA with conversion of client side VBscript to Javascript
Other
5 stars 1 forks source link

parsing error when '&' is next to an 'o' or 'O' #8

Closed jhiswin closed 10 years ago

jhiswin commented 10 years ago
<script language=vbscript>
                sHtml=sHtml&"<td width='10%'>"&objNode.selectSingleNode("SpendTime").text&"</td></tr>"
</script>

Error: unexpected char: 'b'

Adding spaces between the "&"s is a workaround.

vehre commented 10 years ago

This error occurred, because vbscripts allows octal constants to be defined by &o[0-7]+. The unexpected letter 'b' was the one from &objNode. This was fixable by inserting a space between the & and the o, because then the look ahead did not analyze for a constant anymore.