| I'm currently using Markdown.pl to do some parsing of Markdown for me in an Arc app (because Arc's Markdown parsing doesn't have things like headings, or lists, etc), and I'm seeing some weird behavior with some strings. (defopl newpost req
(let user (get-user req)
(blogpage (+ blogtitle* " : New Post!")
(if (admin user)
(aform (fn (req)
(let user (get-user req)
(post-page user
(addpost user (arg req "title") (md-pl (arg req "content"))))))
(divid "new"
(label-input 'text "title" "Title")
(label-ta "content" "Content")
(submit))) (pr admin-warn*)))))
(def md-pl (text)
(w/stdout (outfile "mdtmp") (pr text))
(system "perl Markdown.pl --html4tags mdtmp"))
So, what happens is if I pass md-pl something like this: *Foo*
Bar
**Baz**
It properly returns: <p><i>Foo</i></p>
<p>Bar</p>
<p><b>Baz</b></p>
The problem being that when I use the aform from defopl newpost, the result is like [so](http://picpaste.com/pics/Screenshot-4.1205635488.png). Basically, the HTML is being printed out at one point (hence the stuff at the top), but nothing is stored in the actual text field. Examining the hash table for the post shows that there's not even a "text" key, nor value.Any ideas? Nex3 and I worked away on this one for a while, and I'm personally rather confused about this oddity. |