Last modified: 2014-01-03 16:25:50 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T61527, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59527 - DRTRIGON-88 Enable Beautiful Soup power for Subster
DRTRIGON-88 Enable Beautiful Soup power for Subster
Status: RESOLVED FIXED
Product: Tool Labs tools
Classification: Unclassified
DrTrigonBot - General (Other open bugs)
unspecified
All All
: Unprioritized major
: ---
Assigned To: Bugzilla Bug Importer (valhallasw)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-03 16:25 UTC by Bugzilla Bug Importer (valhallasw)
Modified: 2014-01-03 16:25 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bugzilla Bug Importer (valhallasw) 2014-01-03 16:25:43 UTC
This issue was converted from https://jira.toolserver.org/browse/DRTRIGON-88.
Summary: Enable Beautiful Soup power for Subster
Issue type: New Feature - A new feature of the product, which has yet to be developed.
Priority: Major
Status: Closed
Assignee: drtrigon <dr.trigon@surfeu.ch>

-------------------------------------------------------------------------------
From: drtrigon <dr.trigon@surfeu.ch>
Date: Wed, 23 Feb 2011 20:13:19
-------------------------------------------------------------------------------

Introduce a template parameter like e.g. 'beautifulsoup=True' to switch to mode where all tag become:
    
    <!--SUBSTER-BS:html.head.title.contents--><!--SUBSTER-BS:html.head.title.contents-->
    

and their content get replaced with the data retrieved from:
    
    eval("BeautifulSoup().html.head.title.contents")
    

which means the text after 'BS:' gets executed as python code (more or less). Attention for violent code intrusion... ![][1]

   [1]: https://jira.toolserver.org/images/icons/emoticons/smile.gif
Comment 1 Bugzilla Bug Importer (valhallasw) 2014-01-03 16:25:45 UTC
-------------------------------------------------------------------------------
From: drtrigon <dr.trigon@surfeu.ch>
Date: Tue, 19 Jul 2011 12:15:53
-------------------------------------------------------------------------------

Simple code intrusion with ';' is not possible as it seams (which is good):

> Traceback (most recent call last):  
File "test.py", line 774, in <module>  
print eval('BeautifulSoup.BeautifulSoup(a).%s' % item[1])  
File "<string>", line 1  
BeautifulSoup.BeautifulSoup(a).body; print 'hallo'  
^  
SyntaxError: invalid syntax

But there are some points to consider, though: http://lybniz2.sourceforge.net/safeeval.html
Comment 2 Bugzilla Bug Importer (valhallasw) 2014-01-03 16:25:46 UTC
-------------------------------------------------------------------------------
From: drtrigon <dr.trigon@surfeu.ch>
Date: Tue, 19 Jul 2011 12:18:09
-------------------------------------------------------------------------------

Code done in r129.

Some first tests in http://de.wikipedia.org/w/index.php?title=Benutzer:DrTrigon/Spielwiese&diff=91416840&oldid=91416714
Comment 3 Bugzilla Bug Importer (valhallasw) 2014-01-03 16:25:48 UTC
-------------------------------------------------------------------------------
From: drtrigon <dr.trigon@surfeu.ch>
Date: Tue, 19 Jul 2011 12:21:19
-------------------------------------------------------------------------------

As mentioned: code done in r129.

The feature is not documented yet because in testing stage only. If it works well, it has to be documented and included into 'substersim.py'.
Comment 4 Bugzilla Bug Importer (valhallasw) 2014-01-03 16:25:50 UTC
This bug was imported as RESOLVED. The original assignee has therefore not been
set, and the original reporters/responders have not been added as CC, to
prevent bugspam.

If you re-open this bug, please consider adding these people to the CC list:
Original assignee: dr.trigon@surfeu.ch
CC list: dr.trigon@surfeu.ch

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links