Ticket #681 (closed Bug: fixed)

Opened 7 years ago

Last modified 6 years ago

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

681_php.patch (754 bytes) - added by fredck 6 years ago.
Proposal fix for the PHP implementation
681_cfm.patch (849 bytes) - added by wwalc 6 years ago.
Proposal fix for the ColdFusion implementation
681_pl.patch (699 bytes) - added by wwalc 6 years ago.
Proposal fix for the Perl implementation

Change History

comment:1 Changed 7 years ago by martinkou

  • Reporter changed from martinkou to anonymous

comment:2 Changed 7 years ago by martinkou

  • Milestone set to FCKeditor 2.6

comment:3 Changed 6 years ago by fredck

  • Status changed from new to closed
  • Resolution set to duplicate

DUP of #339

comment:4 Changed 6 years ago by fredck

  • Status changed from closed to reopened
  • Resolution duplicate deleted

Wrong DUP assignment.

comment:5 Changed 6 years ago by fredck

  • Keywords Confirmed added
  • Version set to 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 6 years ago by fredck

Proposal fix for the PHP implementation

comment:6 Changed 6 years ago by fredck

  • 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 6 years ago by wwalc

Proposal fix for the ColdFusion implementation

Changed 6 years ago by wwalc

Proposal fix for the Perl implementation

comment:7 Changed 6 years ago by wwalc

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 6 years ago by wwalc

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed with [1189]

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