~p00ya/rest-wordpress/dos-hacks

« back to all changes in this revision

Viewing changes to rest.php

  • Committer: Dean Scarff
  • Date: 2008-02-05 18:23:59 UTC
  • Revision ID: dos@scarff.id.au-20080205182359-c9fo0svesrwic6pz
Don't indiscriminately reST-ize text that looks like A elements.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
  } else {
111
111
    // rst modeline found.
112
112
 
113
 
    // Scan text for more tags and turn them into reST.
114
 
    $pattern = '<a href="(.*)">(.*)</a>';
115
 
    $replacement = "\n\n`\\2 <\\1>`__\n\n";
116
 
    $text = ereg_replace($pattern, $replacement, $text);
117
 
 
118
113
    // Scan text for more target tags and comment them out.
119
114
    $pattern = '<a id="more-([0123456789]+)"></a>';
120
115
    $replacement = '.. <a id="more-\1"></a>';