Announcement

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

#1 2006-08-02 06:13:14

adam.jimenez
Xinha Pro
Registered: 2005-04-19
Posts: 50

xinha processing code

First let me make it clear that i think xinha is absolutely brilliant. And imho is beats the competition hands down.

I just seem to have a persistant problem with the way xinha 'processes' html.

It seems that when you switch between wysiwyg and source view - xinha processes the code and makes it neater.

Whilst it does this it sometimes strips out tags it shouldn't and adds in tags like tbody which weren't there before.
Also by placing adding in line breaks - sometimes that can alter the page layout, say if you had two images next to each other.
I think it also behaves slightly differently between FF and IE.

Is there anyway to just disable this behaviour so that it just leaves the souce code as it is.

I've enabled fullscreen and gethtml plugins. They've helped but are not the solution.

Adam

Offline

#2 2006-08-03 03:56:18

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

Re: xinha processing code

Short answer. No.


James Sleeman

Offline

#3 2006-08-03 04:06:40

adam.jimenez
Xinha Pro
Registered: 2005-04-19
Posts: 50

Re: xinha processing code

Ok, I thought that may be the case.

My main problem is the random disappearance of bookmarks ie <a name="main"></a> and span tags.

This behaviour seems to be random and I can't reproduce it everytime. It's only occurred in IE so far.

I know it's not much to go on but is this a known problem?

Offline

#4 2006-08-03 05:34:37

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

Re: xinha processing code

Well, those certainly shouldn't disappear UNLESS they are invalidly placed within the HTML.  If your HTML is not valid, or not well-formed then anybody's guess as to how the browser will construct a DOM from it.  An example of an invalid thing...

<table>
<a name="main"></a>
<tr>

Not saying thats what you're doing, but that would be a common cause.


James Sleeman

Offline

#5 2006-08-03 05:38:45

adam.jimenez
Xinha Pro
Registered: 2005-04-19
Posts: 50

Re: xinha processing code

Thanks,

It's not me personally, it's a client so I wouldn't rule it out!

Offline

#6 2006-08-17 07:59:56

Geoffrey
Xinha Community Member
Registered: 2005-03-21
Posts: 10

Re: xinha processing code

Random disappearance of <a href="xxx"></a> tags (i.e. anchors) is caused by a simple bug which I have reported in ticket 831 http://xinha.python-hosting.com/ticket/831 . This is the text of the report:

The following line in function checkEmpty(el) eats anchors on a page during a cleanup operation:

    if ( /^(a|span|b|strong|i|em|font)$/i.test(el.tagName) && !el.firstChild)
    {
      HTMLArea.removeFromParent(el);
      ++stats.empty_tags;
    }
The problem is the a in the list of tags to remove. Anchors are by definition empty tags, but they shouldn't be removed from a page during cleanup because this will break links. Removing the a in the above list solves the problem. While we're here, why not add empty div and p tags to this list?

Offline

#7 2006-08-20 15:18:32

mharrisonline
Xinha Administrator
From: Denver, Colorado
Registered: 2005-04-11
Posts: 110
Website

Re: xinha processing code

Sometimes empty divs are used as containers to load dynamic content into...

Offline

#8 2006-08-21 13:20:37

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

Re: xinha processing code

Geoffrey,
<a href="xxx"></a> is indeed not correct. a + href is a hyperlink that is supposed to be clickable and thus cannot be empty. An anchor is usually a + name

Offline

#9 2006-08-21 16:04:42

adam.jimenez
Xinha Pro
Registered: 2005-04-19
Posts: 50

Re: xinha processing code

i think thats what he meant ray. the point still stands that <a name="xxx"></a> should not be automatically removed.

Offline

#10 2006-08-26 07:31:34

Geoffrey
Xinha Community Member
Registered: 2005-03-21
Posts: 10

Re: xinha processing code

Yes, just to confirm that even relatively "complex" anchors such as
<a class="anchor" id="myplace" title="myplace"></a>
get wiped out by this cleaning subroutine "bug".

Offline

Board footer

Powered by FluxBB