mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		@@ -6,9 +6,9 @@
 | 
				
			|||||||
    </head>
 | 
					    </head>
 | 
				
			||||||
    <body>
 | 
					    <body>
 | 
				
			||||||
        <form action="result.html" enctype="multipart/form-data">
 | 
					        <form action="result.html" enctype="multipart/form-data">
 | 
				
			||||||
            <input type="text" name="foo[bar]" />
 | 
					            <input type="text" name="foo[bar]">
 | 
				
			||||||
            <input type="text" name="foo[baz]" />
 | 
					            <input type="text" name="foo[baz]">
 | 
				
			||||||
            <input type="submit" name="submit" value="submit" />
 | 
					            <input type="submit" name="submit" value="submit">
 | 
				
			||||||
        </form>
 | 
					        </form>
 | 
				
			||||||
    </body>
 | 
					    </body>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,21 +6,21 @@
 | 
				
			|||||||
    </head>
 | 
					    </head>
 | 
				
			||||||
    <body>
 | 
					    <body>
 | 
				
			||||||
        <form action="result.html" enctype="multipart/form-data">
 | 
					        <form action="result.html" enctype="multipart/form-data">
 | 
				
			||||||
            <input type="text" name="email" placeholder="email" />
 | 
					            <input type="text" name="email" placeholder="email">
 | 
				
			||||||
            <input type="password" name="password" placeholder="password" />
 | 
					            <input type="password" name="password" placeholder="password">
 | 
				
			||||||
            <textarea name="content"></textarea>
 | 
					            <textarea name="content"></textarea>
 | 
				
			||||||
            <select name="topic">
 | 
					            <select name="topic">
 | 
				
			||||||
                <option>foo</option>
 | 
					                <option>foo</option>
 | 
				
			||||||
                <option value="bar">baz</option>
 | 
					                <option value="bar">baz</option>
 | 
				
			||||||
            </select>
 | 
					            </select>
 | 
				
			||||||
            <input type="checkbox" name="check" />
 | 
					            <input type="checkbox" name="check">
 | 
				
			||||||
            <input type="radio" name="choice" value="yes" />
 | 
					            <input type="radio" name="choice" value="yes">
 | 
				
			||||||
            <input type="radio" name="choice" value="no" />
 | 
					            <input type="radio" name="choice" value="no">
 | 
				
			||||||
            <input type="file" name="file" />
 | 
					            <input type="file" name="file">
 | 
				
			||||||
            <input type="checkbox" name="checklist[]" value="1" />
 | 
					            <input type="checkbox" name="checklist[]" value="1">
 | 
				
			||||||
            <input type="checkbox" name="checklist[]" value="2" />
 | 
					            <input type="checkbox" name="checklist[]" value="2">
 | 
				
			||||||
            <input type="checkbox" name="checklist[]" value="3" />
 | 
					            <input type="checkbox" name="checklist[]" value="3">
 | 
				
			||||||
            <input type="submit" name="submit" value="submit" />
 | 
					            <input type="submit" name="submit" value="submit">
 | 
				
			||||||
        </form>
 | 
					        </form>
 | 
				
			||||||
    </body>
 | 
					    </body>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,8 +5,8 @@
 | 
				
			|||||||
        <title>CasperJS test frames</title>
 | 
					        <title>CasperJS test frames</title>
 | 
				
			||||||
    </head>
 | 
					    </head>
 | 
				
			||||||
    <frameset cols="50%,50%%">
 | 
					    <frameset cols="50%,50%%">
 | 
				
			||||||
        <frame src="frame1.html" name="frame1" />
 | 
					        <frame src="frame1.html" name="frame1">
 | 
				
			||||||
        <frame src="frame2.html" name="frame2" />
 | 
					        <frame src="frame2.html" name="frame2">
 | 
				
			||||||
    </frameset>
 | 
					    </frameset>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,12 +5,12 @@
 | 
				
			|||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
    <form name="f1">
 | 
					    <form name="f1">
 | 
				
			||||||
        <input type="hidden" name="f" value="f1" />
 | 
					        <input type="hidden" name="f" value="f1">
 | 
				
			||||||
        <input type="text" name="yo" />
 | 
					        <input type="text" name="yo">
 | 
				
			||||||
    </form>
 | 
					    </form>
 | 
				
			||||||
    <form name="f2">
 | 
					    <form name="f2">
 | 
				
			||||||
        <input type="hidden" name="f" value="f2" />
 | 
					        <input type="hidden" name="f" value="f2">
 | 
				
			||||||
        <input type="text" name="yo" />
 | 
					        <input type="text" name="yo">
 | 
				
			||||||
    </form>
 | 
					    </form>
 | 
				
			||||||
</body>
 | 
					</body>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,8 +10,8 @@
 | 
				
			|||||||
        </script>
 | 
					        </script>
 | 
				
			||||||
    </head>
 | 
					    </head>
 | 
				
			||||||
    <body>
 | 
					    <body>
 | 
				
			||||||
        <img src="images/phantom.png" id="img1" />
 | 
					        <img src="images/phantom.png" id="img1">
 | 
				
			||||||
        <img src="images/phantom.png" id="img2" style="display:none" />
 | 
					        <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="img3" style="visibility:hidden">
 | 
				
			||||||
    </body>
 | 
					    </body>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
@@ -204,9 +204,16 @@ def check_handlebar_templates(templates, modified_only):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
def check_html_templates(templates, modified_only):
 | 
					def check_html_templates(templates, modified_only):
 | 
				
			||||||
    # Our files with .html extensions are usually for Django, but we also
 | 
					    # 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.
 | 
					    # 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))
 | 
					    templates = sorted(list(templates))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if not modified_only:
 | 
					    if not modified_only:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user