Bug in Find function of the HTML...

User 36848 Photo


Registered User
77 posts

Paul seems to have discovered a bug in the Find function. I did some tests and it appears that when a line break is included in the search, the length of the selected string is increased by as many characters. For example, if you have

<TD VALIGN="TOP">
<P ALIGN="RIGHT">14 May 1848</TD>

and you use as your search string

<TD VALIGN="TOP">
<P
(including the space after the P), then the selected string after the search is
<TD VALIGN="TOP">
<P A

and after replacement you will lose the A

Furthermore, if you have one more blank line
<TD VALIGN="TOP">

<P ALIGN="RIGHT">14 May 1848</TD>
and your search string is

<TD VALIGN="TOP">

<P
(again including the space after the P), then the selected string after the search is
<TD VALIGN="TOP">

<P AL
and you would lose too letters upon replacement.

Even more disturbing is the fact that if your objective is to eliminate blank lines you may end up chopping the first characters of the next non blank line.

The workaround is NOT to search for multiple lines or line breaks, but the developers should take a look at this, and while they are at it they might also add a Regular Expression option.

Regards

Rafael

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.