Last modified: 2014-07-24 13:12:03 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 T57236, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55236 - Self closing tags
Self closing tags
Status: NEW
Product: Pywikibot
Classification: Unclassified
Cosmetic changes (Other open bugs)
unspecified
All All
: Lowest enhancement
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:48 UTC by Kunal Mehta (Legoktm)
Modified: 2014-07-24 13:12 UTC (History)
2 users (show)

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


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:48:52 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1334/
Reported by: Anonymous user
Created on: 2011-08-28 15:13:07
Subject: Self closing tags
Original description:
Since MW 1.16 wgHtm5 and wgWellFormedXml are turned on by default. And cosmetic\_changes.py still changes things like <br> to <br />, I don't see any reason for that. There are three options we have here:
\* Stop making these kind of changes
\* Make these changes "complete" and add some tags that are not fixed \(eg. <hr> to <hr />\)
\* Do just the opposite, and let the MW fix the tags \(eg. a<br/> to <br>, etc\)
I like the third option, because it makes the code easier to read for editors.
In the attachment there's a patch to apply the third option.

python version.py:
Pywikipedia \[http\] trunk/pywikipedia \(r9462, 2011/08/28, 11:34:03\)
Python 2.7 \(r27:82500, Aug 07 2010, 16:54:59\) \[GCC\]
config-settings:
use\_api = True
use\_api\_login = True
Comment 1 Kunal Mehta (Legoktm) 2013-10-05 04:48:54 UTC
Patch
Comment 2 Kunal Mehta (Legoktm) 2013-10-05 04:48:56 UTC
<hr> will be replaced by mediawiki syntax ----
look at cosmetic\_changes.fixHtml\(\)
Comment 3 Kunal Mehta (Legoktm) 2013-10-05 04:48:58 UTC
Ups, didn't remember that \(since I have seen plenty of hr in templates\), so you can't ignore the second line in patch.
Comment 4 Amir Ladsgroup 2014-07-24 13:12:03 UTC
The bug says in cosmetic changes the code needs to change <br /> to <br> instead of doing vice versa. I don't have any opinion on this

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


Navigation
Links