Opened 10 years ago

Closed 10 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)

681_php.patch (754 bytes) - added by Frederico Caldeira Knabben 10 years ago.
Proposal fix for the PHP implementation
681_cfm.patch (849 bytes) - added by Wiktor Walc 10 years ago.
Proposal fix for the ColdFusion implementation
681_pl.patch (699 bytes) - added by Wiktor Walc 10 years ago.
Proposal fix for the Perl implementation

Download all attachments as: .zip

Change History (11)

comment:1 Changed 10 years ago by Martin Kou

Reporter: changed from Martin Kou to anonymous

comment:2 Changed 10 years ago by Martin Kou

Milestone: FCKeditor 2.6

comment:3 Changed 10 years ago by Frederico Caldeira Knabben

Resolution: duplicate
Status: newclosed

DUP of #339

comment:4 Changed 10 years ago by Frederico Caldeira Knabben

Resolution: duplicate
Status: closedreopened

Wrong DUP assignment.

comment:5 Changed 10 years ago by Frederico Caldeira Knabben

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.

Changed 10 years ago by Frederico Caldeira Knabben

Attachment: 681_php.patch added

Proposal fix for the PHP implementation

comment:6 Changed 10 years ago by Frederico Caldeira Knabben

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 10 years ago by Wiktor Walc

Attachment: 681_cfm.patch added

Proposal fix for the ColdFusion implementation

Changed 10 years ago by Wiktor Walc

Attachment: 681_pl.patch added

Proposal fix for the Perl implementation

comment:7 Changed 10 years ago by Wiktor Walc

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)

comment:8 Changed 10 years ago by Wiktor Walc

Resolution: fixed
Status: reopenedclosed

Fixed with [1189]

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy