image tag uses double or single quotes
We have an image stored in the database as u.avatar and an image on disk as /images/default.png.
When using output(u.avatar) it creates an <img src=''> tag with single quotes. While using image(“/images/default.png”) outputs an <img src=""> tag with double quotes. It would be nice if WebDSL is more consistent.
And how is the behaviour of image(‘/images/default.png’) explained? It generates:
Submitted by Niels Egberts on 6 April 2011 at 12:06
<img src=“localhost:8446/koobfaceDSL’/image/default.png’”> (note the quotes inside the other quotes)
Issue Log
Indeed, the
image
template should use double quotes, here is an improved implementation that you can include in your application:define img(s:String){ <img src=s all attributes/> }
It looks like the single quotes are allowed in the syntax, but the compiler assumes double quotes. This needs to be fixed (disallow single quotes).
Log in to post comments