Skip to content

Commit

Permalink
Embedded scripts should start on a newline.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeabdullah committed Jul 21, 2010
1 parent 1ca811e commit 8a9783e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions KSHTMLWriter.m
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ - (void)startJavascriptElementWithSrc:(NSString *)src; // src may be nil
[self writeAttribute:@"type" value:@"text/javascript"]; // in theory, HTML5 pages could omit this
if (src) [self writeAttribute:@"src" value:src];
[self didStartElement];

// Embedded scripts should start on their own line for clarity
if (!src) [self writeString:@"\n"];
}

- (void)startJavascriptCDATA;
Expand Down

0 comments on commit 8a9783e

Please sign in to comment.