예제 #1
0
 def test_char_references_in_attributes(self):
     self.assertEquals(
         [
             html_linter.EntityReferenceMessage(
                 line=1, column=11, entity=' ')
         ],
         html_linter.HTML5Linter('<a href=" &#32; ">').messages)
예제 #2
0
    def test_entity_references(self):
        self.assertEquals([
            html_linter.EntityReferenceMessage(
                line=1, column=2, entity='&aacute;')
        ],
                          html_linter.HTML5Linter(' &aacute; ').messages)

        self.assertEquals(
            [],
            html_linter.HTML5Linter(' &lt; &gt; &nbsp; &amp; ').messages)
예제 #3
0
    def test_entity_references_in_attributes(self):
        self.assertEquals(
            [
                html_linter.EntityReferenceMessage(
                    line=1, column=11, entity='&aacute;')
            ],
            html_linter.HTML5Linter('<a href=" &aacute; ">').messages)

        self.assertEquals([],
                          html_linter.HTML5Linter(
                              '<a href="&lt; &gt; &nbsp; &amp;">').messages)
예제 #4
0
 def test_char_references(self):
     self.assertEquals([
         html_linter.EntityReferenceMessage(
             line=1, column=2, entity='&#32;')
     ],
                       html_linter.HTML5Linter(' &#32; ').messages)