[pmwiki-users] HTML dumped by Markup implementation appears in edit box.

Luis Fernandez dropmeaword at yahoo.com
Wed Aug 9 18:20:40 CDT 2006

Hi all,

I have created two custom tags for a PmWiki instance I
am working on. Both have the same bug, I'll use just
one of them to illustrate the problem.

I have created a very simple tag (:latinamerica:) that
dumps a clickable map of Latin America as an HTML
image map. It works wonderfully well upon display.

My problem is that when I try to edit a wiki page that
contains the wiki markup (:latinamerica:) in it. The
edit box displays, not the elegant PmWiki markup
(:latinamerica:) but the hodgepodge of HTML generated
by my wiki markup implementation. It seems the edit
doesn't reverse the markup interpretation. 

Everytime I edit the page I have to manually replace
the produced HTML with the adecuate wiki markup.

This is the markup hook:

Markup("latinamerica", "_end",
"/\\(:latinamerica:\\)/", GetMapOfLatinAmerica());

This is the markup implementation:

function GetMapOfLatinAmerica() {
  global $UserInstanceVars, $Author, $WikiTitle,
$pagename, $UserAuthAllowCookie, $PubDirUrl;
  $map_markup = <<<HEAPSOFHTML

  return FmtPageName($map_markup, $pagename);
} // GetMapOfLatinAmerica()

Hope I have explained myself correctly. I'm new to
PmWiki and I might not know what I'm doing or saying
for that matter.  :)

Thanks in advance.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the pmwiki-users mailing list