Browse files

sourceless <SCRIPT>s likely don't want to be inline.

  • Loading branch information...
1 parent f7565a3 commit 12b9584110f95feda2e8836c7a564455692550be @mikeabdullah mikeabdullah committed Jun 1, 2012
Showing with 10 additions and 7 deletions.
  1. +10 −7 KSHTMLWriter.m
View
17 KSHTMLWriter.m
@@ -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];
+ }
}
}

0 comments on commit 12b9584

Please sign in to comment.