Skip to content

Commit

Permalink
sourceless <SCRIPT>s likely don't want to be inline.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeabdullah committed Jun 1, 2012
1 parent f7565a3 commit 12b9584
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions KSHTMLWriter.m
Expand Up @@ -319,15 +319,18 @@ - (void)startJavascriptElementWithSrc:(NSString *)src; // src may be nil
if (src)
{
[self pushAttribute:@"src" value:src];
[self startElement:@"script"];
}

[self startElement:@"script"];

// Embedded scripts should start on their own line for clarity
if (!src)
else
{
[self writeString:@"\n"];
[self stopWritingInline];
// Embedded scripts should start on their own line for clarity
[self startElement:@"script" writeInline:NO];

if (!src)
{
[self writeString:@"\n"];
[self stopWritingInline];
}
}
}

Expand Down

0 comments on commit 12b9584

Please sign in to comment.