Ticket #1003 (closed Bug: fixed)

Opened 7 years ago

Last modified 7 years ago

WikiSyntax - lists and special characters: ;:#*

Reported by: wwalc Owned by:
Priority: Normal Milestone:
Component: Project : MediaWiki+FCKeditor Version:
Keywords: Pending Cc:

Description

;:#* characters have special meaning in lists, thus they must be translated into html entities

Examples: ; item : definition

:#abc :#def :#ghi

  • You can also

break lines like this

Change History

comment:1 Changed 7 years ago by Flavien

FYI, tested with revision 954, there is still a problem with definition lists

Example:

;Note:This is an example.

is converted to:

<dl><dt>Note</dt><dd>This is an example.</dd></dl>

Then at each conversion it get worst:

<dl><dt>Note&lt;/dt&gt;</dt><dd>This is an example.&lt;/dd&gt;</dd></dl> 

comment:2 follow-up: ↓ 3 Changed 7 years ago by wwalc

  • Status changed from new to closed
  • Resolution set to fixed

Fixed with [965], please check whether this problem still exists.

comment:3 in reply to: ↑ 2 Changed 7 years ago by Flavien

  • Status changed from closed to reopened
  • Resolution fixed deleted

Replying to wwalc:

Tested with [966] and it's better but now there is still a problem: at each save a line break or <br> is inserted.

Example:

;Note: This is an example.
* A line with a bullet.

is converted to:

;Note:This is an example.


* A line with a bullet.

Then at each conversion it get worst:

;Note:This is an example.


<br>

* A line with a bullet.

Note: The space between Note: This is removed after the first conversion. It makes apparently no visual differences but will raise error in diffs.

comment:4 Changed 7 years ago by ycombarnous

There is the same issue sometimes with li tag. What I did to remove this behavior was to add conditionally the line break in lists:

if (stringBuilder.length > 0 
     && !stringBuilder[ stringBuilder.length - 1 ].EndsWith( '\n' ))
	stringBuilder.push( '\n' ) ;

comment:5 Changed 7 years ago by ycombarnous

I think removing BR tags in lists would be sane to (adding _inList like _inPre) could make sense.

comment:6 Changed 7 years ago by wwalc

This has been (almost) fixed with [1033] (thanks again for a patch!).

"Almost" because one extra <br> tag is added which will cause diff troubles.

The space between Note: This will be removed (unfortunately) because we lose information about how wiki text is represented. So if there is a couple of ways to represent the same information, we use always one. I believe it can be hard to fix.

Ycombarnous, could you give me an example how to reproduce BR error in <li> tag?

comment:7 Changed 7 years ago by w.olchawa

  • Keywords Pending added

comment:8 Changed 7 years ago by wwalc

  • Status changed from reopened to closed
  • Resolution set to fixed

Handling lists and special characters (;:#*) improved with [1862] & [1863].

comment:9 Changed 7 years ago by wwalc

Related tickets: #1469, #1100.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy