[daisy] Trying to add onclick to links in user documents..

Bruno Dumon bruno at outerthought.org
Wed Apr 9 10:06:22 CEST 2008


IIRC it's the HTML editor in IE which serializes the HTML this way.
Maybe try editing with Firefox to see if you get the same.

On Wed, 2008-04-09 at 09:45 +0200, Karel Vervaeke wrote:
> Can you check if the "function onclick(event)" part is stored in the
> blobs or not (e.g. search for 'event' in the blobstore, but double check
> if you use Windows explorer's search functionality - I don't trust it)?
> It would make it a lot easier to determine where it comes from.
> 
> Regards,
> Karel 
> 
> On Tue, 2008-04-08 at 22:45 -0700, Alan Mortensen wrote:
> > I saw this question asked like two years ago with no reply, I'm hoping
> > that won't be the case again.
> > 
> > I recently changed htmlcleaner.xml to allow onclick in links.  And it
> > doesn't filter them out but.. It does this:
> > <a href="#" onclick="foo">here</a>
> > goes to:
> > <a href="#" onclick="function onclick(event) {        foo</a>
> > 
> > Which of course is broken in all kinds of ways.. and I can't figure
> > out where the heck it comes from.  I've been searching through
> > documents for onclick and even "(event)" to see what's inserting that
> > text.. No luck.  I've tried all kinds of values for "foo" and they all
> > get the same treatment.
> > 
> > I'm really in a bind with this one since it's a complex situation
> > where I really don't see a way around having links go to javascript.
> > Perhaps I could define my own tag that get's transformed into the
> > right kind of link during document styling or layout.xsl, has anyone
> > done anything like that?  (I've seen the link transformer thing in the
> > knowledgebase and that sounds way too low level)  Or does someone have
> > a way to get around this onclick weirdness?  It'd be much
> > appreciated..  At least 100 internets to you on receipt of a
> > reasonable solution :)  Not to mention bragging rights..
> > 
> > Alan
-- 
Bruno Dumon                             http://outerthought.org/
Outerthought                            http://www.daisycms.org/
bruno at outerthought.org              http://www.kauriproject.org/



More information about the daisy mailing list