Announcement

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

#1 2006-06-15 09:08:29

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

Xinha messes up everything

Ok.

I need to stop Xinha from making *ANY* automated changes to  a tags.

Firstly, it changes all of my <a $some_word$> tags to <a>.

It changes all the URLs to be relative and other things. I don't want xinha to make automated changes like this. How do I stop it???/

It also changes <a href=somepage.html> to <a href="somepage.html">

David

Last edited by dlublink (2006-06-15 09:10:38)

Offline

#2 2006-06-16 09:58:40

steveo125
Xinha Community Member
Registered: 2006-04-04
Posts: 24

Re: Xinha messes up everything

Some of the changes could be due to the browser rendering the code.  I notice the FF often shows me slightly different code to what I send it when I view source - even on static pages.

As far as producing good valid html goes, Xinha is the best I know of - I've never found are reason to want any code other than proper valid code.

Anyway to try and answer one of your points, there is a config option called 'stripBaseHref' the default is true and I believe it relates to making all URL's relative.  Set it false and see what happens,

The only other thing that may work is changing the doc type.  This would be for the editable area and not the containing page.  The doc type tells the browser which code standard to work to.  And older type would be more suitable for what you propose.

If force it to strict in the initIframe function

if (HTMLArea.is_ie) {
      html =  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'+"\n";
       html += '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'+"\n";
    } else {
      html='';
    }

That goes just above the other html+= lines.  Depending upon your level of ability you should be able to figure out how to set an older doc type (HTML4).  To be honest I'm still not sure it will solve your problems.

Offline

#3 2006-06-25 23:28:22

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

Re: Xinha messes up everything

Xinha is only designed to edit valid HTML.  If your $someword$ is not valid HTML, expect it to be stripped (by the browser rather than Xinha).


James Sleeman

Offline

#4 2006-11-03 14:42:03

oeginc
New member
Registered: 2006-01-25
Posts: 4

Re: Xinha messes up everything

But that's not always true.. I am having a similar problem, actually - 2 problems...

1) Xinha is stripping everything except the contents of my <body> tags..
2) Xinha is cleaning up the HTML code for tables which is causing it to break in IE:

For example #1:
===========
<html><head><title>testing</title></head>
<body>test text</body></html>

When you put that into the editor and save it, the only thing I get in the file is 'test text'... No HTML tags at all... (This is a grossly understated example, but you get the point).  The "real" problem I am having is with users editing templates that have CSS code built-in... Xinha appears to strip all of that code, meta tags, etc. out of the template.


For example #2:
===========
<html><head><title>testing in IE</title></head>
<body><table cellpadding=0 cellspacing=0><tr><td><img src="img1.gif"></td></tr><tr><td><img src="img2.gif"></td></tr></table></body>

Works fine and stacks the two images directly on top of eachother without any spacing, but when Xinha gets ahold of that, it reforms it to something like this:

<html>
<head>
  <title>testing in IE</title>
</head>

<body>
  <table cellpadding=0 cellspacing=0>
  <tr>
    <td><img src="img1.gif"></td>
  </tr>
  <tr>
    <td><img src="img2.gif"></td>
  </tr>
  </table>
</body>

Which is 'technically' correct I suppose, but IE now renders those two images with a small gap in-between them...

Any ideas on what I can do to fix these two problems?

-- Rob

Offline

#5 2006-11-03 20:39:14

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

Re: Xinha messes up everything

oeginc wrote:

1) Xinha is stripping everything except the contents of my <body> tags..

xinha_config.fullPage = true;

oeginc wrote:

Which is 'technically' correct I suppose,

You say it

oeginc wrote:

but IE now renders those two images with a small gap in-between them...

Really?!  I didn't expect it to be this broken!

Offline

#6 2006-11-04 12:12:47

wymsy
Xinha Community Member
From: Massachusetts, USA
Registered: 2005-04-01
Posts: 44
Website

Re: Xinha messes up everything

IE now renders those two images with a small gap in-between them...

This was corrected in the most recent version of the getHtml plugin (changeset:601).

Offline

#7 2009-10-28 11:30:35

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

Re: Xinha messes up everything

gogo wrote:

Xinha is only designed to edit valid HTML.  If your $someword$ is not valid HTML, expect it to be stripped (by the browser rather than Xinha).

Actually, I found out later that it does not have to be entirely valid. If I add new attributes, it works anyway. Example <span secret_fun_value="David is Cool">Hello world!</span>

Offline

Board footer

Powered by FluxBB