Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13497 closed defect (fixed)

Symbol markup cannot be escaped

Reported by: Ryan J Ollos Owned by: Jun Omae
Priority: normal Component: WikiExtrasPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

See TracDev/Proposals/VerticalHorizontalParsing@4.

The transformation of (C) to the copyright symbol can't be escaped using !(C).

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by Jun Omae

The result of prepare_regexp should be enclosed with (?: and ) but missing parentheses in tracwikiextras/symbols.py.

$ git grep 'prepare_regexp(' -- '*.py'
tracwikiextras/icons.py:            yield (r"(?<!\w)!?(?:%s)" % prepare_regexp(self.smileys),
tracwikiextras/phrases.py:        yield ('!?(?:%s)' % prepare_regexp(self.text), self._format_phrase)
tracwikiextras/symbols.py:            yield ('!?%s' % prepare_regexp(self.symbols), self._format_symbol)
tracwikiextras/util.py:def prepare_regexp(d):
  • wikiextrasplugin/trunk/tracwikiextras/symbols.py

    diff --git a/wikiextrasplugin/trunk/tracwikiextras/symbols.py b/wikiextrasplugin/trunk/tracwikiextras/symbols.py
    index aa997828c..3563c09c2 100755
    a b class Symbols(Component): 
    119119                    del self.symbols[keyword]
    120120
    121121        if self.symbols:
    122             yield ('!?%s' % prepare_regexp(self.symbols), self._format_symbol)
     122            yield ('!?(?:%s)' % prepare_regexp(self.symbols),
     123                   self._format_symbol)
    123124        else:
    124125            yield (None, None)
    125126

comment:2 Changed 6 years ago by Ryan J Ollos

Thanks. If you can commit the change, I will go ahead and update the plugin on t.e.o.

comment:3 Changed 6 years ago by Jun Omae

Resolution: fixed
Status: newclosed

In 17307:

TracWikiExtras 1.3.1dev: fix unable to escape symbol markups (closes #13497)

comment:4 Changed 6 years ago by Jun Omae

Owner: changed from Mikael Relbe to Jun Omae

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.