Opened 13 years ago
Closed 12 years ago
#968 closed defect (fixed)
spaces are stripped from before and after tags
Reported by: | jedi58 | Owned by: | gogo |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Xinha Core | Version: | |
Severity: | normal | Keywords: | |
Cc: |
Description
Sometime in the past week or two a change has been made that when switching between html and code view any spaces are stripped around tags, so
"some <strong>bold</strong> text"
becomes:
"some<strong>bold</strong>text"
Change History (6)
comment:1 Changed 13 years ago by ray
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 12 years ago by guest
- Resolution fixed deleted
- Status changed from closed to reopened
This problem seems to be more general. I added this (using link popup) to the editor (four links separated by spaces):
<a href="http://www.google.com">This</a> <a href="http://www.google.com">is</a> <a href="http://www.google.com">a</a> <a href="http://www.google.com">test</a>
but Xinha always removes the spaces
<a href="http://www.google.com">This</a><a href="http://www.google.com">is</a><a href="http://www.google.com">a</a><a href="http://www.google.com">test</a>
The same problem is also with another tags (I used http://xinha.gogo.co.nz/xinha-nightly/examples/ext_example.html for testing).
<p><strong>Lorem</strong> <em>ipsum</em> <u>dolor</u> sit amet, ...
becomes
<p><strong>Lorem</strong><em>ipsum</em><u>dolor</u> sit amet, ...
I used old version earlier ( $LastChangedDate: 2006-01-19 14:10:25 +1300 (Thu, 19 Jan 2006) $ $LastChangedRevision: 461 $ ) and it worked fine there.
jhoracek (at) redweb (dot) cz
comment:3 Changed 12 years ago by ray
- Resolution set to fixed
- Status changed from reopened to closed
fixed rev [864] (sorry that was me)
comment:4 Changed 12 years ago by guest
- Resolution fixed deleted
- Status changed from closed to reopened
Sorry, but it seems to me that the problem still remains.
http://xinha.gogo.co.nz/xinha-nightly/examples/ext_example.html
text
<p><strong>Lorem</strong> <em>ipsum</em> <u>dolor</u> sit amet, ...
is still automatically converted into
<p><strong>Lorem</strong><em>ipsum</em><u>dolor</u> sit amet, ...
I also tried to download and replace the file you updated, but with the same result.
comment:5 Changed 12 years ago by guest
This fixes the problem - line 299 of DOMwalk.js:
current version:
else if(root.data.trim() == '') { html = ''; }
fixed code:
else if(root.data.trim() == '') { if(root.data) html = ' '; else html = ''; }
comment:6 Changed 12 years ago by ray
- Resolution set to fixed
- Status changed from reopened to closed
Ok, put that in in rev [871]
fixed rev [760]