Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#1003 closed Bug (fixed)

WikiSyntax - lists and special characters: ;:#*

Reported by: Wiktor Walc 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 (9)

comment:1 Changed 16 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 Changed 16 years ago by Wiktor Walc

Resolution: fixed
Status: newclosed

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

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

Resolution: fixed
Status: closedreopened

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 16 years ago by barns

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 16 years ago by barns

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

comment:6 Changed 16 years ago by Wiktor Walc

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 16 years ago by Wojciech Olchawa

Keywords: Pending added

comment:8 Changed 16 years ago by Wiktor Walc

Resolution: fixed
Status: reopenedclosed

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

comment:9 Changed 16 years ago by Wiktor Walc

Related tickets: #1469, #1100.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy