Announcement

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

#1 2006-05-23 17:05:47

dlublink
Xinha Community Member
Registered: 2006-05-15
Posts: 10

Absolute URLs in IMG SRC are cut

Hey,

It looks like the Absolute URLs in my HTML pages are being dropped and replaced by the file name. The &s in the name are being replaced with &

How do I stop it from doing this?

Thanks,

David

Offline

#2 2006-05-24 03:59:32

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Absolute URLs in IMG SRC are cut

All ampersands in HTML unless they form part of an entity are required to be converted to & no matter if they are in an element's attribute or text.  That's the specification.  The browser internally converts & to the raw ampersand.

As for absolute link stripping, there are a couple of config vars you can play with...

  // specify a base href for relative links
  this.baseHref  = null;

  // we can strip the base href out of relative links to leave them relative, reason for this
  //   especially if you don't specify a baseHref is that mozilla at least (& IE ?) will prefix
  //   the baseHref to any relative links to make them absolute, which isn't what you want most the time.
  this.stripBaseHref = true;


James Sleeman

Offline

#3 2008-11-20 19:30:50

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

Re: Absolute URLs in IMG SRC are cut

For me, I just had to add this before Xinha was initialised:

xinha_config.stripBaseHref = false ;

Presumably the syntax James gives is for when you're editing Xinha-Core.js to change the defaults, and the method I used allows you to specify an override for a specific site or page. (My Xinha install is shared across multiple sites, so hacking the core files isn't the best approach on my setup.)

Offline

#4 2008-11-21 05:43:21

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Absolute URLs in IMG SRC are cut

Absolutely

Offline

Board footer

Powered by FluxBB