Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2008-11-20 18:50:24

xurizaemon
New member
Registered: 2008-11-20
Posts: 3

Xinha stripping baseHref from image URLs

I want to configure Xinha to leave absolute image URLs in place (because the generated content will be sent via email, and we can't use an src like "/images/pic.jpg" in emails).

I've tried setting the following -

Xinha.Config.stripBaseHref = false ; // is this not the setting i want?

and in desparation, even tried adding -

Xinha.Config.baseHref = 'http://abc.def.ghi/' ; // in the hope it just won't match my URL at all

... but no joy with that either.

I'm using Xinha 0.95 on Drupal5.

If I disable Xinha entirely, the img tag keeps its absolute src attribute, so it doesn't appear to be any kind of Drupal filter that's stripping the image paths.

If not stripBaseHref, what is the correct method to disable this behaviour? I'm sure Xinha will be capable of handling absolute URLs correctly somehow.

Last edited by xurizaemon (2008-11-20 18:56:01)

Offline

#2 2008-11-20 19:28:09

xurizaemon
New member
Registered: 2008-11-20
Posts: 3

Re: Xinha stripping baseHref from image URLs

Ah ... I must have not read the docs thoroughly enough.

Xinha.Config() is a prototype function, and it appears the correct way to override the defaults from that function is to define a variable xinha_config which has the properties you want.

The fix for me, then, appears to have been:

xinha_config.stripBaseHref = false ;

This seems to be working fine now. Thanks for listening smile

Offline

Board footer

Powered by FluxBB