Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1393/
Reported by: ganz-ru
Created on: 2012-01-14 17:37:31
Subject: cosmetic_changes.py and <code>
Original description:
Here:
http://ru.wikipedia.org/w/index.php?diff=40245627&oldid=39731202
http://ru.wikipedia.org/w/index.php?diff=40765267&oldid=39425330
cosmetic_changes.py replaced the internal internal html-text of <code>...<code> with unicode symbols. That's not good, since the tag <code> is for an original representation of codes, including the html-code. So, I propose to add this tag to the exception list of exceptions.
Description
Details
- Reference
- bz55222
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
[bugfix] Re-enable resolveHtmlEntities | pywikibot/core | master | +13 -7 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | None | T141024 Add Phabricator tasks to comments for buggy cosmetic changes | |||
Resolved | Dvorapa | T57222 cosmetic_changes.py and <code> | |||
Resolved | Dvorapa | T195026 Merge regexes from removeDisabledParts with regexes from _create_default_regexes |
Event Timeline
As I see, it just necessary to add this tag into arrays of exceptions and it does not requir editing of any other parts of code. So please accelerate the processing of of this bug.
@ganz-du: unfortunatelly this part of code does not use replaceExcept\(\) and we have no exceptions list where to add that tag.
CosmeticChangesToolkit.resolveHtmlEntities\(\) deactivated in pyrev:10438 due to this bug
It happens because of the html2unicode function, it can be fixed either in textlib or cosmetic_changes.py
I believe this should be fixed by adding 'code' to the list of exceptions for all of the cosmetic change rules which might reasonably alter something in <code>..</code>, IMO <code> should always be excluded. (as code is used for showing wikitext)
@jayvdb: as mentioned above unfortunatelly this part of code does not use replaceExcept\(\) and we have no exceptions list where to add that tag.
Change 434309 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Re-enable resolveHtmlEntities