[HOME PAGE] [STORES] [CLASSICISTRANIERI.COM] [FOTO] [YOUTUBE CHANNEL]


Bug 6500 – Cannot put -{ }- into CharInsert

Last modified: 2011-07-12 03:27:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 6500 - Cannot put -{ }- into CharInsert
Cannot put -{ }- into CharInsert
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Language converter (Other open bugs)
unspecified
PC All
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://sr.wikipedia.org/wiki/MediaWik...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-30 15:46 UTC by Robert Stojnic
Modified: 2011-07-12 03:27 UTC (History)
4 users (show)

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


Attachments

Description Robert Stojnic 2006-06-30 15:46:16 UTC
The -{ }- characters are used in languages with variants (like Serbian wiki).

Here is the problem. The following line:
<charinsert><nowiki>-{</nowiki>+<nowiki>}-</nowiki></charinsert>

is in Parser.php replaced with:
<a onclick="insertTags('-{','}-','');return false" href="#">-{}-</a>

However, this replecement is done before $wgContLang->parserConvert() is called,
which interprets 
the -{ }- characters, and deletes them, leaving:
<a onclick="insertTags('','','');return false" href="#"></a>

A dirty hack is possible in LanguageConverter::parserConvert(), however a better
solution would
be if the <nowiki> tags (or actualy the UNIQ-hack tags for nowiki) would be put
in before parserConvert(), i.e. if the charinsert would interpret <nowiki> tags
in the usual way.
Comment 1 Filip Maljkovic [Dungodung] 2008-02-02 00:23:28 UTC
Well, there's a hack in MediaWiki:Edittools itself: since long time ago, we've been using <charinsert>-{-}--{{}-+-{}}--{-}-</charinsert> which isn't pretty but is effective. Does this bug really need to be fixed, because it wouldn't make much difference.
Comment 2 Danny B. 2008-02-02 00:36:45 UTC
How about using entities, would that help? It seems to work on testwiki, however it might have different configuration (I don't know how language variants are set).

So something like

<charinsert>-&#x7b;+&#x7d;-</charinsert>

or escape the dashes or both.

Another approach is this (successfully used on our wiki to hack some issues):

Add <charinsert>{-+-}</charinsert> instead and put some code in MediaWiki:Common.js (just simply iterate over the links, find the one with this text and replace the onclick) which will do the replace to "-{", "}-".
Comment 3 Dan Collins 2011-07-12 03:27:21 UTC
I performed the following test on the serbian wikipedia:

-{x}-

<nowiki>-{</nowiki>x<nowiki>}-</nowiki>

It rendered as follows:

x

-{x}-

Closing as fixed.

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


Contents Listing Alphabetical by Author:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Unknown Other

Contents Listing Alphabetical by Title:
# A B C D E F G H I J K L M N O P Q R S T U V W Y Z Other

Medical Encyclopedia

Browse by first letter of topic:


A-Ag Ah-Ap Aq-Az B-Bk Bl-Bz C-Cg Ch-Co
Cp-Cz D-Di Dj-Dz E-Ep Eq-Ez F G
H-Hf Hg-Hz I-In Io-Iz J K L-Ln
Lo-Lz M-Mf Mg-Mz N O P-Pl Pm-Pz
Q R S-Sh Si-Sp Sq-Sz T-Tn To-Tz
U V W X Y Z 0-9

Biblioteca - SPANISH

Biblioteca Solidaria - SPANISH

Bugzilla

Ebooks Gratuits

Encyclopaedia Britannica 1911 - PDF

Project Gutenberg: DVD-ROM 2007

Project Gutenberg ENGLISH Selection

Project Gutenberg SPANISH Selection

Standard E-books

Wikipedia Articles Indexes

Wikipedia for Schools - ENGLISH

Wikipedia for Schools - FRENCH

Wikipedia for Schools - SPANISH

Wikipedia for Schools - PORTUGUESE

Wikipedia 2016 - FRENCH

Wikipedia HTML - CATALAN

Wikipedia Picture of the Year 2006

Wikipedia Picture of the Year 2007

Wikipedia Picture of the Year 2008

Wikipedia Picture of the Year 2009

Wikipedia Picture of the Year 2010

Wikipedia Picture of the Year 2011