Bug report: /> and then </a> tag on new line

Here is a curious problem which changes a file so that a link which was
formerly just for an image is made to extend to an unwanted space added
to the right of the image.

This happens with the latest release 9.52 on both Windows and Debian.  I
don't think it has anything to do with the "Keep multiple spaces" option
being on or off.

Edit the file:

  http://www.firstpr.com.au/temp/amaya/amaya-test-10.html

View the source.  The image and link text in the original file is:

-----
<blockquote>
  <a href="../../show-and-tell/green-ants/"><img
  alt="Photos of Queensland Daintree rainforest and beach"
  src="show-and-tell-green-ants-310x300.jpg" border="0" height="300"
  width="319"></a>

  <p>Old photos and postcards, a colour photo from 1913. . . .
-----

However Amaya displays an anomalous light blue tilde after the </a>

  width="319"></a>~

This is not the bug, but it is not right either.  (It really is a
non-breaking space - I can copy and paste it to prove this.)

Now add a second exclamation mark to the end of the heading. (Actually,
making any change to the file will work.)

Now click on the source window.  Strange things appear on and after the
"width" line:  An extra space, a '/' and then the "</a>~" is placed on
the next line, with two spaces of indenting.

-----
<blockquote>
  <a href="../../show-and-tell/green-ants/"><img
  alt="Photos of Queensland Daintree rainforest and beach"
  src="show-and-tell-green-ants-310x300.jpg" border="0" height="300"
  width="319" />
  </a>~

  <p>Old photos and postcards, a colour photo from 1913. . . .
-----

Apart from the '!' there is no visible change in the main edit window.

However, if you save the file, it will be like the above, but without
the tilde:

-----
<blockquote>
  <a href="../../show-and-tell/green-ants/"><img
  alt="Photos of Queensland Daintree rainforest and beach"
  src="show-and-tell-green-ants-310x300.jpg" border="0" height="300"
  width="319" />
  </a>

  <p>Old photos and postcards, a colour photo from 1913. . . .
-----

This is interpreted by the browser as a space before the end of the
hyperlink, since the newline and two spaces are interpreted as a single
space.

After the save, Amaya won't display the blue line of the link as a
browser would.  However, the space is there if you use the cursor to
step along it.  When you close Amaya and then open the saved file, it
will be visible as a little blue underline.

If I try the same process with a file with the same functional content,
but different formatting of the picture and link lines:

  http://www.firstpr.com.au/temp/amaya/amaya-test-12.html

I get exactly the same results.

I changed Preferences > Publishing > Fixed line length from 0 (which
selects the default) to 200 and closed the program.  Then I restarted
and editted amaya-test-10.html.  The strange tilde appeared as before.
When I added the '!' and looked at the source, there was a major
reformatting operation and the entire picture and link material appeared
on one line, here truncated:

-----
<blockquote>
  <a href="../../show-and-tell . . . .  width="319" />
  </a>

  <p>Old photos and postcards, a colour photo from 1913. . . .
-----

This is exactly the same problem, so the output line length limit is not
the problem.

Mozilla Composer has a bug which causes a similar effect - I think due
to some bad choice of where to wrap the line when saving.  (I spent
probably a week trying to fix that, and another related bug which would
gobble spaces.) I was really looking forward to cleaning these unsightly
linked spaces out of my sites - but at present Amaya causes similar trouble.

 - Robin

Received on Friday, 20 October 2006 08:49:41 UTC