Edgewall Software
Modify

Opened 14 months ago

Last modified 14 months ago

#13389 new defect

Wikicreole line breaks not working in cases with colons?

Reported by: benjamin.a.lau@… Owned by:
Priority: normal Milestone:
Component: wiki system Version: 1.4.2
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Having a weird issue with the wikicreole line break syntax.

Issue wiki markup
Mon-Fri 8:30am-7pm\\Sat 11am-8:30pm\\Sun 10am-5:30pm

Mon-Fri 8:30am-7:00pm\\Sat 11:00am-8:30pm\\Sun 10:00am-5:30pm

Mon-Fri 8:30am-7pm\\Sat 11am-830pm\\Sun 10am-5:30pm
Issue rendering

Mon-Fri 8:30am-7pm
Sat 11am-8:30pm\\Sun 10am-5:30pm

Mon-Fri 8:30am-7:00pm\\Sat 11:00am-8:30pm\\Sun 10:00am-5:30pm

Mon-Fri 8:30am-7pm
Sat 11am-830pm
Sun 10am-5:30pm

These don't all render correctly. The first just the first line break renders.

In the second none of the line breaks render.

In the last one I removed the : in 8:30pm and then it renders correctly. On the trac instance where I encountered this I also noticed that if I put spaces around the \\ it'll render correct. And I can replace the : with : and make it work (which is a feature of the WikiExtras plug-in).

I'm guessing I'm looking for some edge case in the wiki parser.

Attachments (1)

Screen Shot 2021-04-11 at 12.38.01 AM.png (174.9 KB ) - added by benjamin.a.lau@… 14 months ago.
screenshot of wiki syntax and mucked up rendering in preview mode

Download all attachments as: .zip

Change History (3)

by benjamin.a.lau@…, 14 months ago

screenshot of wiki syntax and mucked up rendering in preview mode

in reply to:  description comment:1 by Jun Omae, 14 months ago

This is not a defect. I suggest closing as wontfix.

Mon-Fri 8:30am-7pm\\Sat 11am-8:30pm\\Sun 10am-5:30pm
                          ^^^^^^^^^^^^^^ Trac is parsing as a URI

Examples:

12345:x\\y 12345:x
y
not URI
a:x\\y a:x\\y a:x\\y is a URI
1a:x\\y 1a:x\\y a:x\\y is a URI
1http://x\\y 1http://x\\y http://x\\y is a URI

comment:2 by benjamin.a.lau@…, 14 months ago

But that string starts with a number (even if a sub-portion of it is a uri) which isn't valid for the scheme portion of a uri. From wikipedia URL:

A non-empty scheme component followed by a colon (:), consisting of a sequence of characters beginning with a letter and followed by any combination of letters, digits, plus (+), period (.), or hyphen (-).

By that definition 12345:x\\y, 1a:x\\y, and 1http://x\\y are not valid URIs

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.