The noescape attribute can be used to suppress escaping of the src (5.2.7.3) attribute.
>>> import albatross >>> ctx = albatross.SimpleContext('.') >>> ctx.locals.url = 'http://www.com/img?a=1&b=2' >>> albatross.Template(ctx, '<magic>', ''' ... <al-img expr="url" noescape whitespace> ... ''').to_html(ctx) >>> ctx.flush_content() <img src="http://www.com/img?a=1&b=2">