Announcement

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

#1 2012-01-08 15:27:01

anotherdev
New member
Registered: 2012-01-08
Posts: 2

Xinha modifies href and src

Hello.

I've been trying Xinha (Revision: 1263) and noticed a problem with href and src.

What happens is the following:

<a href="../link/">link</a>
<!--becomes-->
<a href="/link/">link</a>

and

<img src="../images/image.jpg" />
<!--becomes-->
<img src="/images/image.jpg" />

With the "Latest Nightly":

<a href="../link/">link</a>
<!--becomes-->
<a href="/xinha-nightly/examples/link/">link</a>

and

<img src="../images/image.jpg" />
<!--becomes-->
<img src="/xinha-nightly/examples/images/image.jpg" />

Is it possible to keep exactly what was written or disable this behaviour through the options?

Offline

#2 2012-01-22 19:47:31

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

Re: Xinha modifies href and src

See the following configuration items...

  /** If true, relative URLs (../) will be made absolute. 
   *  When the editor is in different directory depth 
   *  as the edited page relative image sources will break the display of your images.
   *  this fixes an issue where Mozilla converts the urls of images and links that are on the same server 
   *  to relative ones (../) when dragging them around in the editor (Ticket #448)<br />
   *  Default: <code>true</code>
   *  @type Boolean
   */
  this.expandRelativeUrl = true;
  
 /**  We can strip the server part out of URL to make/leave them semi-absolute, reason for this
   *  is that the browsers will prefix  the server to any relative links to make them absolute, 
   *  which isn't what you want most the time.<br />
   *  Default: <code>true</code>
   *  @type Boolean
   */
  this.stripBaseHref = true;

James Sleeman

Offline

#3 2012-01-24 11:38:39

anotherdev
New member
Registered: 2012-01-08
Posts: 2

Re: Xinha modifies href and src

Thanks, that works.

Offline

Board footer

Powered by FluxBB