The branch, frodo has been updated
       via  236c2ea298d91eac6779ff78ac9b5d9597dc080a (commit)
       via  8b697f51e8b9a80b34f319b40dba1cfc5c06259b (commit)
      from  daea5ff13406f01c3e99ec1369ed74460eff91b9 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=236c2ea298d91eac6779ff78ac9b5d9597dc080a


http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=8b697f51e8b9a80b34f319b40dba1cfc5c06259b

commit 8b697f51e8b9a80b34f319b40dba1cfc5c06259b
Author: Martijn Kaijser <[email protected]>
Date:   Wed Sep 25 22:30:24 2013 +0200

    [script.module.beautifulsoup] 3.2.1

diff --git a/script.module.beautifulsoup/addon.xml 
b/script.module.beautifulsoup/addon.xml
index 5927a99..499fe88 100644
--- a/script.module.beautifulsoup/addon.xml
+++ b/script.module.beautifulsoup/addon.xml
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.module.beautifulsoup"
        name="BeautifulSoup"
-       version="3.2.0"
+       version="3.2.1"
        provider-name="Leonard Richardson ([email protected])">
   <requires>
     <import addon="xbmc.python" 
-               version="2.0"/>
+               version="2.1.0"/>
   </requires>
   <extension point="xbmc.python.module"
              library="lib" />
diff --git a/script.module.beautifulsoup/lib/BeautifulSoup.py 
b/script.module.beautifulsoup/lib/BeautifulSoup.py
index 4b17b85..7278215 100644
--- a/script.module.beautifulsoup/lib/BeautifulSoup.py
+++ b/script.module.beautifulsoup/lib/BeautifulSoup.py
@@ -79,8 +79,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE, 
DAMMIT.
 from __future__ import generators
 
 __author__ = "Leonard Richardson ([email protected])"
-__version__ = "3.2.0"
-__copyright__ = "Copyright (c) 2004-2010 Leonard Richardson"
+__version__ = "3.2.1"
+__copyright__ = "Copyright (c) 2004-2012 Leonard Richardson"
 __license__ = "New-style BSD"
 
 from sgmllib import SGMLParser, SGMLParseError
@@ -114,6 +114,21 @@ class PageElement(object):
     """Contains the navigational information for some part of the page
     (either a tag or a piece of text)"""
 
+    def _invert(h):
+        "Cheap function to invert a hash."
+        i = {}
+        for k,v in h.items():
+            i[v] = k
+        return i
+
+    XML_ENTITIES_TO_SPECIAL_CHARS = { "apos" : "'",
+                                      "quot" : '"',
+                                      "amp" : "&",
+                                      "lt" : "<",
+                                      "gt" : ">" }
+
+    XML_SPECIAL_CHARS_TO_ENTITIES = _invert(XML_ENTITIES_TO_SPECIAL_CHARS)
+
     def setup(self, parent=None, previous=None):
         """Sets up the initial relations between this element and
         other elements."""
@@ -421,6 +436,16 @@ class PageElement(object):
                 s = unicode(s)
         return s
 
+    BARE_AMPERSAND_OR_BRACKET = re.compile("([<>]|"
+                                           + "&(?!#\d+;|#x[0-9a-fA-F]+;|\w+;)"
+                                           + ")")
+
+    def _sub_entity(self, x):
+        """Used with a regular expression to substitute the
+        appropriate XML entity for an XML special character."""
+        return "&" + self.XML_SPECIAL_CHARS_TO_ENTITIES[x.group(0)[0]] + ";"
+
+
 class NavigableString(unicode, PageElement):
 
     def __new__(cls, value):
@@ -451,10 +476,12 @@ class NavigableString(unicode, PageElement):
         return str(self).decode(DEFAULT_OUTPUT_ENCODING)
 
     def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING):
+        # Substitute outgoing XML entities.
+        data = self.BARE_AMPERSAND_OR_BRACKET.sub(self._sub_entity, self)
         if encoding:
-            return self.encode(encoding)
+            return data.encode(encoding)
         else:
-            return self
+            return data
 
 class CData(NavigableString):
 
@@ -480,21 +507,6 @@ class Tag(PageElement):
 
     """Represents a found HTML tag with its attributes and contents."""
 
-    def _invert(h):
-        "Cheap function to invert a hash."
-        i = {}
-        for k,v in h.items():
-            i[v] = k
-        return i
-
-    XML_ENTITIES_TO_SPECIAL_CHARS = { "apos" : "'",
-                                      "quot" : '"',
-                                      "amp" : "&",
-                                      "lt" : "<",
-                                      "gt" : ">" }
-
-    XML_SPECIAL_CHARS_TO_ENTITIES = _invert(XML_ENTITIES_TO_SPECIAL_CHARS)
-
     def _convertEntities(self, match):
         """Used in a call to re.sub to replace HTML, XML, and numeric
         entities with the appropriate Unicode characters. If HTML
@@ -681,15 +693,6 @@ class Tag(PageElement):
     def __unicode__(self):
         return self.__str__(None)
 
-    BARE_AMPERSAND_OR_BRACKET = re.compile("([<>]|"
-                                           + "&(?!#\d+;|#x[0-9a-fA-F]+;|\w+;)"
-                                           + ")")
-
-    def _sub_entity(self, x):
-        """Used with a regular expression to substitute the
-        appropriate XML entity for an XML special character."""
-        return "&" + self.XML_SPECIAL_CHARS_TO_ENTITIES[x.group(0)[0]] + ";"
-
     def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING,
                 prettyPrint=False, indentLevel=0):
         """Returns a string or Unicode representation of this tag and

-----------------------------------------------------------------------

Summary of changes:
 script.module.beautifulsoup/addon.xml              |    4 +-
 script.module.beautifulsoup/lib/BeautifulSoup.py   |   59 +-
 script.module.beautifulsoup4/AUTHORS.txt           |   43 +
 script.module.beautifulsoup4/LICENSE               |   26 +
 script.module.beautifulsoup4/README.txt            |   63 +
 script.module.beautifulsoup4/addon.xml             |   18 +
 script.module.beautifulsoup4/lib/bs4/__init__.py   |  393 +++++
 .../lib/bs4/builder/__init__.py                    |  321 ++++
 .../lib/bs4/builder/_html5lib.py                   |  285 +++
 .../lib/bs4/builder/_htmlparser.py                 |  250 +++
 .../lib/bs4/builder/_lxml.py                       |  233 +++
 script.module.beautifulsoup4/lib/bs4/dammit.py     |  826 +++++++++
 script.module.beautifulsoup4/lib/bs4/diagnose.py   |  204 +++
 script.module.beautifulsoup4/lib/bs4/element.py    | 1611 +++++++++++++++++
 script.module.beautifulsoup4/lib/bs4/testing.py    |  592 +++++++
 .../lib/bs4/tests/__init__.py                      |    1 +
 .../lib/bs4/tests/test_builder_registry.py         |  141 ++
 .../lib/bs4/tests/test_docs.py                     |   36 +
 .../lib/bs4/tests/test_html5lib.py                 |   85 +
 .../lib/bs4/tests/test_htmlparser.py               |   19 +
 .../lib/bs4/tests/test_lxml.py                     |   90 +
 .../lib/bs4/tests/test_soup.py                     |  425 +++++
 .../lib/bs4/tests/test_tree.py                     | 1829 ++++++++++++++++++++
 23 files changed, 7524 insertions(+), 30 deletions(-)
 create mode 100644 script.module.beautifulsoup4/AUTHORS.txt
 create mode 100644 script.module.beautifulsoup4/LICENSE
 create mode 100644 script.module.beautifulsoup4/README.txt
 create mode 100644 script.module.beautifulsoup4/addon.xml
 create mode 100644 script.module.beautifulsoup4/lib/bs4/__init__.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/builder/__init__.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/builder/_html5lib.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/builder/_htmlparser.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/builder/_lxml.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/dammit.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/diagnose.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/element.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/testing.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/tests/__init__.py
 create mode 100644 
script.module.beautifulsoup4/lib/bs4/tests/test_builder_registry.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/tests/test_docs.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/tests/test_html5lib.py
 create mode 100644 
script.module.beautifulsoup4/lib/bs4/tests/test_htmlparser.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/tests/test_lxml.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/tests/test_soup.py
 create mode 100644 script.module.beautifulsoup4/lib/bs4/tests/test_tree.py


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to