[Mono-dev] [PATCH] System.Web.Compilation/AspTokenizer.cs

Juraj Skripsky js at hotfeet.ch
Mon Jun 19 04:58:59 EDT 2006


Hi,

The patch you propose is not quite right:

...
               } else if (!inServerTag) {
...
...
               } else if (!inServerTag && quoted && c == quoteChar) {
                     return Token.NOTWELLFORMED;
               }

The case "!inServerTag" is already handled a few lines before, making
"return Token.NOTWELLFORMED" unreachable.

But there is a problem with fix 61757. The quoting rules (or rather the
rules of their nesting) change depending on whether we're inside a
server control or not.

We probably need to tokenize all attributes as if we're not inside a
server control, noting whether the stricter rules were violated or not.
After reading all attributes we check for the presence of runat="server"
and throw in the case of violation.

I'll have a look at it.

- Juraj



On Mon, 2006-06-19 at 01:17 -0700, Konstantin Triger wrote:
> Hello,
> 
>  
> 
> Following the fix 61757: this code started throwing not well formed:
> 
> <img src="Handler.ashx?PhotoID=<%# Eval("PhotoID") %>&Size=M" />
> 
>  
> 
> This is because Eval(…) contains quotes. The attached patch fixes that
> by ignoring quotes inside server tag.
> 
>  
> 
> Please review.
> 
>  
> 
> Regards,
> 
> Konstantin Triger
> 
>  
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list