Opened 17 years ago
Closed 17 years ago
#681 closed Bug (fixed)
SpellerPages ignores text after links
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.6 |
Component: | General | Version: | SVN (FCKeditor) - Retired |
Keywords: | SF Confirmed HasPatch | Cc: |
Description
When using the SpellerPages spell check function, try spell checking the following:
This is mispeled here is a link and this is mispeled too
where the word "link" is a link. SpellerPages detects the first "mispeled" as an error but ignores the one after the link.
Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1334262&group_id=75348&atid=543653
Attachments (3)
Change History (11)
comment:1 Changed 17 years ago by
Reporter: | changed from Martin Kou to anonymous |
---|
comment:2 Changed 17 years ago by
Milestone: | → FCKeditor 2.6 |
---|
comment:3 Changed 17 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:4 Changed 17 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Wrong DUP assignment.
comment:5 Changed 17 years ago by
Keywords: | Confirmed added |
---|---|
Version: | → SVN |
The problem here is that Aspell stops checking after <a> tags.
The fact is that we are not checking the contents of the tags, so there is no sense passing them to Aspell for checking. So, a possible solution would be stripping all tags before sending the data to Aspell. It would also fix any possible element related problem, like #339.
comment:6 Changed 17 years ago by
Keywords: | HasPatch added |
---|
I've attached a possible fix for the PHP implementation of SpellerPages. It strips out all html tags from the text before sending it to Aspell.
If ok, the same solution should be incorporated in the ColdFusion and Perl implementations for this ticket to be closed.
Changed 17 years ago by
Attachment: | 681_cfm.patch added |
---|
Proposal fix for the ColdFusion implementation
comment:7 Changed 17 years ago by
I think that Fred's proposal is the right way to go. I thought at the beginning that we may use built-in strip_tags() function in PHP, but I think that replacing tag with a space would give more expected results, consider the following examples:
take a look at this<img src="..."/>picture
"this" and "picture" are two separate words that are separated only by some image, so additional space here is helpful.
...and small example where this approach fails:
this<b>isone</b>word
is being transformed to
this isone word
(a word, where only a part of it is placed in a tag, I suppose it is a rare case)
DUP of #339