Ticket #1129 (new enhancement)

Opened 14 years ago

Last modified 13 years ago

Searching for wiki links in BaseParser

Reported by: Laurent Pelecq <laurent.pelecq@…> Owned by: tziade
Priority: P1 Milestone: CPS 3.5.7
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.
  1. 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 Download (2.2 KB) - added by lpelecq 14 years ago.
Example of parsing with HTTPParser

Change History

Changed 14 years ago by lpelecq

Example of parsing with HTTPParser

comment:1 Changed 14 years ago 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.

comment:2 Changed 14 years ago by madarche

  • Version changed from CPS 3.3 branch to TRUNK
  • Milestone changed from CPS 3.2.5 to CPS 3.4.1

comment:3 Changed 13 years ago by sfermigier

  • Milestone changed from CPS 3.4.1 to CPS 3.4.2

comment:4 Changed 13 years ago by sfermigier

  • Milestone changed from CPS 3.4.2 to CPS 3.4.3
Note: See TracTickets for help on using tickets.