Page MenuHomePhabricator

cosmetic_changes.py and <code>
Closed, ResolvedPublic

Description

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.

https://sourceforge.net/p/pywikipediabot/bugs/1393

Details

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:27 AM
bzimport set Reference to bz55222.
bzimport added a subscriber: Unknown Object (????).
  • assigned_to: nobody --> xqt
  • status: open --> open-accepted

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.

  • assigned_to: xqt --> nobody

duplicated by bug \#3530791
raising prio.

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

jayvdb lowered the priority of this task from Medium to Low.Nov 30 2014, 4:15 PM
jayvdb set Security to None.
jayvdb removed a subscriber: Unknown Object (????).

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.

Dvorapa changed the task status from Open to Stalled.May 21 2018, 10:30 AM
Dvorapa claimed this task.
Dvorapa raised the priority of this task from Low to Medium.
Dvorapa moved this task from Backlog to Doing on the good first task board.
Dvorapa subscribed.

Change 434309 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Re-enable resolveHtmlEntities

https://gerrit.wikimedia.org/r/434309