Ticket #3810 (new defect (bug))

Opened 2 years ago

Last modified 1 week ago

Wrong quotation mark after bracket

Reported by: josepo Assigned to: anonymous
Priority: normal Milestone: 2.8
Component: General Version: 2.1.1
Severity: normal Keywords: has-patch 2nd-opinion needs-testing
Cc:

Description

formatting.php sets a closing quotation mark after a bracket, even at the beginning of words. Example:

A dog ("Hubertus") was sent out.

The first quotation mark will not be formatted properly. This looks especially ugly when using the intypo plugin.

Solution: In formatting.php, replace the line

$dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');

with

$dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([\'\s])/', '/(\s|\A|\s\(|\A\()"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');

Attachments

3810.diff (1.1 kB) - added by Nazgul on 02/23/07 21:52:49.
formatting.diff (1.0 kB) - added by mrmist on 12/28/08 13:07:27.
refreshed against 10257

Change History

02/18/07 16:33:01 changed by josepo

This solution is a whole lot better yet (covers all expressions where the delimiting blank does not immediately precede or follow the quotation mark):

$dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([\'\s])/', '/(\s|\A|\s\S|\A\S)"(?!(\s|\A|\S\s|\S\A))/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');

Currently,

<p>A dog named "<a href="http://...">Hubertus</a>":</p>

results in the second quotation mark turning the wrong way. This is fixed by the solution shown above. (Of course, it also covers the bracket problem.)

02/18/07 19:48:33 changed by foolswisdom

  • version set to 2.1.1.
  • milestone changed from 2.1.2 to 2.2.

02/23/07 21:52:49 changed by Nazgul

  • attachment 3810.diff added.

02/23/07 21:53:22 changed by Nazgul

  • keywords set to has-patch.

Patch based on given code snippet added.

02/25/07 13:44:14 changed by markjaquith

  • keywords changed from has-patch to has-patch 2nd-opinion needs-testing.

03/27/07 23:42:17 changed by foolswisdom

  • milestone changed from 2.2 to 2.3.

09/19/07 21:20:48 changed by Nazgul

  • milestone changed from 2.3 to 2.4.

03/26/08 10:29:48 changed by thee17

  • milestone changed from 2.5 to 2.6.

12/28/08 13:07:27 changed by mrmist

  • attachment formatting.diff added.

refreshed against 10257

12/28/08 13:08:49 changed by mrmist

  • milestone changed from 2.9 to 2.8.

I've refreshed the patch on this. Shifting to 2.8 since it has a patch and has been languishing.

It'd suggest it either goes in or is closed.

01/01/09 16:19:18 changed by mrmist

See also #4539