Menu

#98 PhantomBackLink bug

Linking
closed
nobody
5
2014-07-29
2002-02-18
No

Applies to cvs as at 18 Feb 2002 - new markup problem

1) Create a page called NoLinkHere, and enter some
content on it

2) Create another page called PhantomBackLinkBug.
On the page create some content, including the text
~NoLinkHere

3) When rendered with the NewMarkup, the
PhantomBackLinkBug page will display no links.

4) Go to NoLinkHere, and check its BackLinks. The
Bug is revealed!

The bug is in the function ExtractWikiPageLinks
($content) in stdlib.php. Towards the end of the
function, links are matched in the line

if (preg_match_all("/!?$WikiNameRegexp/", $line,
$link)) ....

Clearly, this applies to old markup only.

However, the fix is non-trivial. Changing the ! to ~
will not work with old markup. We could just pass a
parameter to detect whether the markup in use is old
or new, and parse accordingly, but it seems to me
that the best fix would be to rewrite the code so
that the transformation engine itself could extract,
rather than just replace, links.

Until then, I thought I'd better log this on SF

Lawrence

Discussion

  • Geoffrey T. Dairiki

    Logged In: YES
    user_id=45814

    The fix, which is in progess, is to use the (new) markup
    parser to extract the links. Using a whole separate parser
    to extract the links is just a bad idea.

     
  • Marc-Etienne Vargenau

    Closing very old bugs.

     
  • Marc-Etienne Vargenau

    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.