commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/583c64d963d4/ Changeset: 583c64d963d4 User: jmchilton Date: 2013-11-25 16:23:26 Summary: Allow <metabolite>, <metadata>, <metagenome>, etc... in Galaxy XML content. Affected #: 1 file diff -r 9165deb8008461d43107c2b1cd99b750bcb0508f -r 583c64d963d41c7e38f76e2be23531b160ec972f lib/galaxy/datatypes/checkers.py --- a/lib/galaxy/datatypes/checkers.py +++ b/lib/galaxy/datatypes/checkers.py @@ -32,7 +32,7 @@ regexp1 = re.compile( "<A\s+[^>]*HREF[^>]+>", re.I ) regexp2 = re.compile( "<IFRAME[^>]*>", re.I ) regexp3 = re.compile( "<FRAMESET[^>]*>", re.I ) - regexp4 = re.compile( "<META[^>]*>", re.I ) + regexp4 = re.compile( "<META[\W][^>]*>", re.I ) regexp5 = re.compile( "<SCRIPT[^>]*>", re.I ) lineno = 0 for line in temp: https://bitbucket.org/galaxy/galaxy-central/commits/35cc1687eb7b/ Changeset: 35cc1687eb7b User: jmchilton Date: 2013-11-25 16:23:26 Summary: checker.py - define constant for # of lines to check for HTML. Affected #: 1 file diff -r 583c64d963d41c7e38f76e2be23531b160ec972f -r 35cc1687eb7b348811bf9e4f6e9d4374b00b6f09 lib/galaxy/datatypes/checkers.py --- a/lib/galaxy/datatypes/checkers.py +++ b/lib/galaxy/datatypes/checkers.py @@ -2,6 +2,8 @@ from galaxy import util from StringIO import StringIO +HTML_CHECK_LINES = 100 + try: import Image as PIL except ImportError: @@ -35,6 +37,8 @@ regexp4 = re.compile( "<META[\W][^>]*>", re.I ) regexp5 = re.compile( "<SCRIPT[^>]*>", re.I ) lineno = 0 + # TODO: Potentially reading huge lines into string here, this should be + # reworked. for line in temp: lineno += 1 matches = regexp1.search( line ) or regexp2.search( line ) or regexp3.search( line ) or regexp4.search( line ) or regexp5.search( line ) @@ -42,7 +46,7 @@ if chunk is None: temp.close() return True - if lineno > 100: + if HTML_CHECK_LINES and (lineno > HTML_CHECK_LINES): break if chunk is None: temp.close() Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org