Ticket #31 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

JQuery id selector breaks view engine code generator

Reported by: torkelo Assigned to: anonymous
Priority: major Component: AspNet Mvc ViewEngine
Keywords: JQuery Cc:

Description

using an id selector in a jquery query will break the C# code generator. $("#diff").hide();

Change History

07/29/08 19:13:39 changed by anonymous

  • owner set to torkelo.

07/29/08 19:13:59 changed by anonymous

  • owner changed from torkelo to anonymous.

07/29/08 20:44:46 changed by louis.dejardin

  • reporter changed from anonymous to torkelo.

That's the #statement syntax you're bumping into. In the short term you could work-around the problem with the following

  $("${'#'}diff").hide(); 

To avoid the problem I was thinking of making that syntax more restrictive. For example, the # could need to be the first non-whitespace character on a line. It could need to have at least one whitespace character following the #

  # Logger.Warn("Like this");

08/05/08 15:59:43 changed by louis.dejardin

  • status changed from new to closed.
  • resolution set to fixed.
  • component set to AspNet Mvc ViewEngine.

A hash must be the first non-whitespace character on a line. The first line of a file may not contain code.

this is code

# if (x == 5) {

this is not

blah #yarg

The preceding \r\n and optional whitespace before a # line will not be used as output