Revert "Close HTML singleton tags in Casper files."

This reverts commit 520b255d95,
and also blacklists Casper files from our linter.
This commit is contained in:
Steve Howell 2016-07-12 12:28:08 -07:00 committed by Tim Abbott
parent 45d1eefc52
commit 97f28f3792
6 changed files with 32 additions and 25 deletions

View File

@ -6,9 +6,9 @@
</head>
<body>
<form action="result.html" enctype="multipart/form-data">
<input type="text" name="foo[bar]" />
<input type="text" name="foo[baz]" />
<input type="submit" name="submit" value="submit" />
<input type="text" name="foo[bar]">
<input type="text" name="foo[baz]">
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>

View File

@ -6,21 +6,21 @@
</head>
<body>
<form action="result.html" enctype="multipart/form-data">
<input type="text" name="email" placeholder="email" />
<input type="password" name="password" placeholder="password" />
<input type="text" name="email" placeholder="email">
<input type="password" name="password" placeholder="password">
<textarea name="content"></textarea>
<select name="topic">
<option>foo</option>
<option value="bar">baz</option>
</select>
<input type="checkbox" name="check" />
<input type="radio" name="choice" value="yes" />
<input type="radio" name="choice" value="no" />
<input type="file" name="file" />
<input type="checkbox" name="checklist[]" value="1" />
<input type="checkbox" name="checklist[]" value="2" />
<input type="checkbox" name="checklist[]" value="3" />
<input type="submit" name="submit" value="submit" />
<input type="checkbox" name="check">
<input type="radio" name="choice" value="yes">
<input type="radio" name="choice" value="no">
<input type="file" name="file">
<input type="checkbox" name="checklist[]" value="1">
<input type="checkbox" name="checklist[]" value="2">
<input type="checkbox" name="checklist[]" value="3">
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>

View File

@ -5,8 +5,8 @@
<title>CasperJS test frames</title>
</head>
<frameset cols="50%,50%%">
<frame src="frame1.html" name="frame1" />
<frame src="frame2.html" name="frame2" />
<frame src="frame1.html" name="frame1">
<frame src="frame2.html" name="frame2">
</frameset>
</html>

View File

@ -5,12 +5,12 @@
</head>
<body>
<form name="f1">
<input type="hidden" name="f" value="f1" />
<input type="text" name="yo" />
<input type="hidden" name="f" value="f1">
<input type="text" name="yo">
</form>
<form name="f2">
<input type="hidden" name="f" value="f2" />
<input type="text" name="yo" />
<input type="hidden" name="f" value="f2">
<input type="text" name="yo">
</form>
</body>
</html>

View File

@ -10,8 +10,8 @@
</script>
</head>
<body>
<img src="images/phantom.png" id="img1" />
<img src="images/phantom.png" id="img2" style="display:none" />
<img src="images/phantom.png" id="img3" style="visibility:hidden" />
<img src="images/phantom.png" id="img1">
<img src="images/phantom.png" id="img2" style="display:none">
<img src="images/phantom.png" id="img3" style="visibility:hidden">
</body>
</html>

View File

@ -204,9 +204,16 @@ def check_handlebar_templates(templates, modified_only):
def check_html_templates(templates, modified_only):
# Our files with .html extensions are usually for Django, but we also
# have some for Casper tests and a few static ones.
# have a few static .html files.
# The file base.html has a bit of funny HTML that we can't parse here yet.
templates = filter(lambda fn: 'base.html' not in fn, templates)
#
# We also have .html files that we vendored from Casper.
# The casperjs files use HTML5 (whereas Zulip prefers XHTML), and
# there are also cases where Casper deliberately uses invalid HTML,
# so we exclude them from our linter.
templates = filter(
lambda fn: ('base.html' not in fn) and ('casperjs' not in fn),
templates)
templates = sorted(list(templates))
if not modified_only: