Skip to content

Commit 617b7eb

Browse files
committed
7.2.2
1 parent 5edccdd commit 617b7eb

File tree

5 files changed

+32
-9
lines changed

5 files changed

+32
-9
lines changed

AdvancedHTMLParser/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
from .exceptions import InvalidCloseException, MissedCloseException, HTMLValidationException, MultipleRootNodeException
1111
from .SpecialAttributes import StyleAttribute
1212

13-
__version__ = '7.2.1'
14-
__version_tuple__ = ('7', '2', '1')
15-
__int_version_tuple__ = (7, 2, 1)
13+
__version__ = '7.2.2'
14+
__version_tuple__ = ('7', '2', '2')
15+
__int_version_tuple__ = (7, 2, 2)
1616

1717
__all__ = ( 'AdvancedHTMLParser', 'IndexedAdvancedHTMLParser', 'AdvancedHTMLFormatter', 'AdvancedTag', 'TagCollection',
1818
'ValidatingAdvancedHTMLParser', 'MissedCloseException', 'InvalidCloseException', 'HTMLValidationException', 'MultipleRootNodeException',

ChangeLog

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
* 7.2.2 - Aug 07 2017
2+
3+
- Link through dot-access the "target" attribute on anchor "a" tags, and "selected" for option "option" tags.
4+
5+
I.e. this code:
6+
7+
optionEm = document.createElement('option')
8+
9+
optionEm.selected = True
10+
11+
Will mark the "selected" attribute of the option. And
12+
13+
someEm = document.getElementsByTagName('a')[0]
14+
15+
someEm.target = '_blank'
16+
17+
Will set the "target" tag attribute on "someEm"
18+
19+
- Make "selected" a binary attribute, so it can only hold True or False, and is just listed as "selected" on a tag, per proper html. This makes it handle the same was as "checked" attribute
20+
21+
- Some minor cleanups to the RST readme
22+
23+
124
* 7.2.1 Jul 13 2017
225

326
- Fix some issues where style would not show up on tag, after being set

doc/AdvancedHTMLParser.constants.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
<strong >PRESERVE_CONTENTS_TAGS</strong> = {'code', 'pre', 'script', 'style'}<br />
2828
<strong >TAG_ITEM_ATTRIBUTES_SPECIAL_VALUES</strong> = {'tabIndex': &lt;function &lt;lambda&gt;&gt;}<br />
2929
<strong >TAG_ITEM_ATTRIBUTE_LINKS</strong> = {'align', 'className', 'dir', 'hidden', 'id', 'name', ...}<br />
30-
<strong >TAG_ITEM_BINARY_ATTRIBUTES</strong> = {'checked', 'hidden'}<br />
30+
<strong >TAG_ITEM_BINARY_ATTRIBUTES</strong> = {'checked', 'hidden', 'selected'}<br />
3131
<strong >TAG_ITEM_CHANGE_NAME_FROM_ATTR</strong> = {'class': 'className', 'tabindex': 'tabIndex'}<br />
3232
<strong >TAG_ITEM_CHANGE_NAME_FROM_ITEM</strong> = {'className': 'class', 'tabIndex': 'tabindex'}<br />
33-
<strong >TAG_NAMES_TO_ADDITIONAL_ATTRIBUTES</strong> = {'a': {'href'}, 'body': {'onafterprint', 'onbeforeprint', 'onbeforeunload', 'onerror', 'onhashchange', 'onload', ...}, 'button': {'checked', 'onchange', 'oncontextmenu', 'oninput', 'oninvalid', 'onreset', ...}, 'details': {'ontoggle'}, 'form': {'onblur', 'onchange', 'oncontextmenu', 'onfocus', 'oninput', 'oninvalid', ...}, 'input': {'checked', 'onchange', 'oncontextmenu', 'oninput', 'oninvalid', 'onreset', ...}, 'menu': {'onshow'}, 'submit': {'b', 'checked', 'i', 'm', 'n', 'o', ...}}<br />
33+
<strong >TAG_NAMES_TO_ADDITIONAL_ATTRIBUTES</strong> = {'a': {'href', 'target'}, 'body': {'onafterprint', 'onbeforeprint', 'onbeforeunload', 'onerror', 'onhashchange', 'onload', ...}, 'button': {'checked', 'onchange', 'oncontextmenu', 'oninput', 'oninvalid', 'onreset', ...}, 'details': {'ontoggle'}, 'form': {'onblur', 'onchange', 'oncontextmenu', 'onfocus', 'oninput', 'oninvalid', ...}, 'input': {'checked', 'onchange', 'oncontextmenu', 'oninput', 'oninvalid', 'onreset', ...}, 'menu': {'onshow'}, 'option': {'selected'}, 'submit': {'b', 'checked', 'i', 'm', 'n', 'o', ...}}<br />
3434
<strong >otherInputName</strong> = 'option'</td></tr></table>
3535
</p></body></html>

doc/AdvancedHTMLParser.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<table width="100%" cellspacing="0" cellpadding="2" border="0" summary="heading" >
77
<tr bgcolor="#7799ee" >
88
<td valign="bottom" >&nbsp;<br />
9-
<font color="#ffffff" face="helvetica, arial" >&nbsp;<br /><big ><big ><strong >AdvancedHTMLParser</strong></big></big> (version 7.2.1)</font></td><td align="right" valign="bottom" ><font color="#ffffff" face="helvetica, arial" ><a href="AdvancedHTMLParser.html" >index</a></font></td></tr></table>
9+
<font color="#ffffff" face="helvetica, arial" >&nbsp;<br /><big ><big ><strong >AdvancedHTMLParser</strong></big></big> (version 7.2.2)</font></td><td align="right" valign="bottom" ><font color="#ffffff" face="helvetica, arial" ><a href="AdvancedHTMLParser.html" >index</a></font></td></tr></table>
1010
<p ><tt >#&nbsp;Copyright&nbsp;(c)&nbsp;2015,&nbsp;2016,&nbsp;2017&nbsp;Tim&nbsp;Savannah&nbsp;All&nbsp;Rights&nbsp;Rserved&nbsp;under&nbsp;LGPLv3.&nbsp;See&nbsp;LICENSE&nbsp;(https://gnu.org/licenses/lgpl-3.0.txt)&nbsp;for&nbsp;more&nbsp;information.<br />
1111
#<br />
1212
#&nbsp;In&nbsp;general&nbsp;below,&nbsp;all&nbsp;"tag&nbsp;names"&nbsp;(body,&nbsp;div,&nbsp;etc)&nbsp;should&nbsp;be&nbsp;lowercase.&nbsp;The&nbsp;parser&nbsp;will&nbsp;lowercase&nbsp;internally.&nbsp;All&nbsp;attribute&nbsp;names&nbsp;(like&nbsp;`id`&nbsp;in&nbsp;id="123")&nbsp;provided&nbsp;to&nbsp;search&nbsp;functions&nbsp;should&nbsp;be&nbsp;lowercase.&nbsp;Values&nbsp;are&nbsp;not&nbsp;lowercase.&nbsp;This&nbsp;is&nbsp;because&nbsp;doing&nbsp;tons&nbsp;of&nbsp;searches,&nbsp;lowercasing&nbsp;every&nbsp;search&nbsp;can&nbsp;quickly&nbsp;build&nbsp;up.&nbsp;Lowercase&nbsp;it&nbsp;once&nbsp;in&nbsp;your&nbsp;code,&nbsp;not&nbsp;every&nbsp;time&nbsp;you&nbsp;call&nbsp;a&nbsp;function.</tt></p>
@@ -2545,6 +2545,6 @@
25452545

25462546
<tr ><td bgcolor="#55aa55" ><tt >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td >&nbsp;</td>
25472547
<td width="100%" ><strong >__all__</strong> = ('AdvancedHTMLParser', 'IndexedAdvancedHTMLParser', 'AdvancedHTMLFormatter', 'AdvancedTag', 'TagCollection', 'ValidatingAdvancedHTMLParser', 'MissedCloseException', 'InvalidCloseException', 'HTMLValidationException', 'MultipleRootNodeException', 'StyleAttribute', 'toggleAttributesDOM', 'isTextNode', 'isTagNode')<br />
2548-
<strong >__int_version_tuple__</strong> = (7, 2, 1)<br />
2549-
<strong >__version_tuple__</strong> = ('7', '2', '1')</td></tr></table>
2548+
<strong >__int_version_tuple__</strong> = (7, 2, 2)<br />
2549+
<strong >__version_tuple__</strong> = ('7', '2', '2')</td></tr></table>
25502550
</p></p></p></p></body></html>

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
long_description = summary
3939

4040
setup(name='AdvancedHTMLParser',
41-
version='7.2.1',
41+
version='7.2.2',
4242
packages=['AdvancedHTMLParser'],
4343
scripts=['formatHTML'],
4444
author='Tim Savannah',

0 commit comments

Comments
 (0)