Created Issue: Content within HTML conditional comments is ignored [6373]

4 views
Skip to first unread message

sparkviewengine Issue Tracker Rss Feed

unread,
Jun 30, 2010, 11:42:02 AM6/30/10
to spar...@googlegroups.com
What happens: When content is placed within an HTML conditional comment, it is not evaluated by Spark and instead output as a literal string.
What's expected: Content within an HTML conditional comment should be evaluated by Spark.

Example code to reproduce:
<!--[if IE 6]>
<link type="text/css" rel="stylesheet" media="screen" href="~/css/ie.6.css">
<![endif]-->

Expected Output:
<!--[if IE 6]>
<link type="text/css" rel="stylesheet" media="screen" href="http://mysiteroot.com/css/ie.6.css">
<![endif]-->

Actual Output:
<!--[if IE 6]>
<link type="text/css" rel="stylesheet" media="screen" href="~/css/ie.6.css">
<![endif]-->


I appreciate why this is happening - commented content should be ignored, but conditional comment should ideally be handled as a special case.


Further Information:
* Conditional Comments - http://en.wikipedia.org/wiki/Conditional_comment and http://www.quirksmode.org/css/condcom.html

URL: http://sparkviewengine.codeplex.com/workitem/6373

Adam Schroder

unread,
Jun 30, 2010, 10:52:24 PM6/30/10
to spar...@googlegroups.com, sparkviewengine Issue Tracker Rss Feed
Will spark even replace "~" in a attribute??
I'm not sure that it would?

2010/7/1 Asbjørn Ulsberg <asbj...@gmail.com>
Yet another use case that demands a different default comment mechanism, as the previously discussed {#...#} construct (or something similar). With it, these conditional comments wouldn't be an issue.


-Asbjørn
--
You received this message because you are subscribed to the Google Groups "Spark View Engine Dev" group.
To post to this group, send email to spar...@googlegroups.com.
To unsubscribe from this group, send email to spark-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spark-dev?hl=en.


Louis DeJardin

unread,
Jul 1, 2010, 3:30:04 AM7/1/10
to spar...@googlegroups.com, sparkviewengine Issue Tracker Rss Feed

Yep, it will expand leading ~’s in the html attributes that are known to be uri values.

Adam Schroder

unread,
Jul 1, 2010, 3:52:18 AM7/1/10
to spar...@googlegroups.com, sparkviewengine Issue Tracker Rss Feed
Fricken wicked Louis!!!!

Louis DeJardin

unread,
Jul 1, 2010, 7:42:27 PM7/1/10
to spar...@googlegroups.com, sparkviewengine Issue Tracker Rss Feed

Thanks. :)

 

There’s another feature hidden in ~ that you can find buried in the docs for the config settings.

 

http://sparkviewengine.com/documentation/configuring#Sparksettingsinconfigfile

 

In the spark/pages/resources section you can change your production config to replace various ~/xxx prefixes with some alternate value. Putting content on cdn, for example. Works with ISparkSettings in code also.

Reply all
Reply to author
Forward
0 new messages