@@ -117,7 +117,7 @@
-record(html, {?ELEMENT_BASE(element_html), manifest}).
% HTML Scripting
--record(script, {?ELEMENT_BASE(element_script), async, charset, defer, src, type}).
+-record(script, {?ELEMENT_BASE(element_script), async=[], charset=[], defer=[], src=[], type=[]}).
-record(noscript, ?DEFAULT_BASE).
% HTML Sections
@@ -28,4 +28,7 @@ render_element(Record) ->
{<<"src">>,Record#script.src},
{<<"type">>,Record#script.type} | Record#script.data_fields
],
- wf_tags:emit_tag(<<"script">>, nitro:render(case Record#script.body of undefined -> []; B -> B end), List).
+ wf_tags:emit_tag(<<"script">>,
+ case Record#script.src of
+ [] -> nitro:render(case Record#script.body of undefined -> []; B -> B end);
+ X -> [] end, List).