Edgewall Software

Ticket #3232 (new defect)

Opened 2 years ago

Last modified 12 months ago

Wiki syntax should be enforced (for ticket comments)

Reported by: eblot Owned by: cboos
Priority: normal Milestone: 0.13
Component: wiki system Version: devel
Severity: normal Keywords: parser
Cc: dserodio@…

Description

When the wiki syntax is not valid (missing closing tag, for example: ''italic'), Trac does not fix it up.

Although this is not a strong issue with Wiki pages that can be edited and fixed by human beings, it starts to become an issue with ticket comments: the missing wiki tag - which is translated to an XHTML missing tag - propagates across the whole ticket and may corrupt the whole page.

As ticket comments cannot be edited, the only current way to recover from such a simple user mistake is to tweak the SQL DB ;-(

IMHO, Trac should ensure that such an error does not propagate outside a comment, i.e. should always close any open tag along with the end of a comment.

It is worth noting that when post-commit hooks are used -such as the one from the /contrib dir- the user may not even notice than "his" wiki syntax is not correct, as it is never rendered from his subversion client (commit message).

Attachments

comment-missed-a-quote-char.png (18.5 KB) - added by eblot 2 years ago.
Example of ticket page rendering, when one of the comments is short of a closing italic/emphasis tag

Change History

Changed 2 years ago by eblot

Example of ticket page rendering, when one of the comments is short of a closing italic/emphasis tag

  Changed 2 years ago by anonymous

Can you post the exact comment which was causing this? I can't reproduce the issue.

  Changed 2 years ago by eblot

Sure. From sqlite3:

sqlite> select * from ticket_change where ticket=670 and time=1149159330;
670|1149159330|souquiej|comment||(In [575]) Refs #670
 * dyntest: ''sga:mdraw'' renamed to ''sga:drawm''
 * dyntest: new ''sga:adrawm' command, exercised in drawbat.dtf

There are remaining comments after this one, but the display misbehaves starting after the missing "'" char.
If it can help, the server runs [3320].

  Changed 2 years ago by cboos

  • owner changed from jonas to cboos
  • milestone set to 0.10

Ok, thanks, I could reproduce the problem. This is apparently because of the unfinished italic being in a list.

I wanted to implement anyway a more robust block-level elements and inline-level elements stacking algorithm, but this will have to wait 0.11.

I will nevertheless check if there's a simple fix for this specific problem, for 0.10.

  Changed 2 years ago by anonymous

What if I want to have apostrophes in my italic text? How do we avoid false positives trying to "fix" the user's formatting?

  Changed 2 years ago by cboos

The fix will be at the HTML level, not touching the wiki text. In the above example, the last "'" character will stay as is, simply the <i> tag will be closed.

  Changed 2 years ago by Manuzhai

  • milestone changed from 0.10 to 0.11

There seems to be consensus that this can wait for 0.11.

  Changed 22 months ago by cboos

  • keywords parser added
  • priority changed from low to normal

#4702 was closed as duplicate of this one.

  Changed 18 months ago by cboos

  • component changed from ticket system to wiki
  • milestone changed from 0.11 to 0.12

WikiEngine refactoring and related fixes postponed.

follow-up: ↓ 10   Changed 16 months ago by anonymous

It would be nice if comments could be edited somehow; then one could at least work around the kind of problem discussed here.

in reply to: ↑ 9   Changed 16 months ago by eblot

Replying to anonymous:

It would be nice if comments could be edited somehow; then one could at least work around the kind of problem discussed here.

There is a dedicated ticket for this feature (#454), please do not deviate the thread from the original topic.

  Changed 16 months ago by eblot

#5771 marked as a dup.

  Changed 16 months ago by anonymous

  • cc dserodio@… added

  Changed 12 months ago by cboos

  • severity changed from minor to normal

#6344 was closed as duplicate of this ticket.

Add/Change #3232 (Wiki syntax should be enforced (for ticket comments))

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from cboos. Next status will be 'new'
The owner will change from cboos to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.