Ticket #1129 (new enhancement)

Opened 3 years ago

Last modified 2 years ago

Searching for wiki links in BaseParser

Reported by: Laurent Pelecq <laurent.pelecq@soleil.org> Assigned to: tziade
Priority: P1 Milestone: CPS 3.5.0
Component: CPSWiki Version: TRUNK
Severity: normal Keywords: parser wiki link
Cc:

Description

Wiki links are currently searched into HTML code generated from wikipage by the RST parser. It means that links are also searched into HTML markup.

It would be better to either:

1. Search links before generating HTML. But this makes difficult to expand wiki links in the generated HTML code.

2. Parse the HTML code using a sub-class of Python HTMLParser. Wiki links could only be searched into tag contents and probably only into <p> tags.

Attachments

parselinks.tgz (2.2 kB) - added by lpelecq on 11/16/05 20:25:39.
Example of parsing with HTTPParser

Change History

11/16/05 20:25:39 changed by lpelecq

  • attachment parselinks.tgz added.

Example of parsing with HTTPParser

11/16/05 20:28:29 changed by lpelecq

I've attached an example as a proof of concept of point 2. This is a parser that read XHTML files and change all wiki links to bold. It doesn't change anything else than wiki links and doesn't search for wiki links in HTML tags.

11/30/05 10:04:54 changed by madarche

  • version changed from CPS 3.3 branch to TRUNK.
  • milestone changed from CPS 3.2.5 to CPS 3.4.1.

05/16/06 18:13:51 changed by sfermigier

  • milestone changed from CPS 3.4.1 to CPS 3.4.2.

05/19/06 16:49:28 changed by sfermigier

  • milestone changed from CPS 3.4.2 to CPS 3.4.3.