WordPress.org

Make WordPress Core

Opened 15 months ago

Closed 12 months ago

Last modified 12 months ago

#23322 closed defect (bug) (fixed)

The lookup in text editor does nothing when I enter text in hebrew

Reported by: mark-k Owned by: nacin
Milestone: 3.6 Priority: normal
Severity: minor Version:
Component: Editor Keywords: has-patch commit
Focuses: Cc:

Description

  1. In the text editor Click lookup
  2. In the window enter hebrew text and submit
  3. Window closes but nothing else happens

For english text a tab is opened with proper page from answers.com or a "can't find" page.

Several questions

  1. What is the purpose of that button?
  2. Why answers.com? It is hardcoded in JS
  3. If this is useful, why there is no such button in the visual editor?

Attachments (6)

remove-lookup-button.diff (523 bytes) - added by mboynes 14 months ago.
Removing lookup button from quicktags array
23322.patch (4.0 KB) - added by jonbishop 14 months ago.
This removes all references to 'spell' in quicktags args and the javascript that triggers the lookup
23322.2.patch (4.9 KB) - added by SergeyBiryukov 14 months ago.
23322.3 (5.5 KB) - added by jonbishop 14 months ago.
23322.3.patch (5.5 KB) - added by jonbishop 14 months ago.
23322.4.patch (5.6 KB) - added by jonbishop 14 months ago.
Removed dictionaryLookup and lookup

Download all attachments as: .zip

Change History (17)

comment:1 dd3215 months ago

This appears to be some kind of Spell button in Quicktags: http://core.trac.wordpress.org/browser/trunk/wp-includes/js/quicktags.js#L502

I would assume that Hebew text doesn't pass as "word" characters in Javascript regular expressions causing nothing to happen.

I uh, vote to remove the button myself, it doesn't appear to be anything of use, When it was added 9 years ago, answers.com may have actually been useful.

For reference, answers.com was added in [2476] (previously it was dictionary.reference.com, which was either present in b2, or added somewhere around WordPress changeset [300]).

comment:2 mark-k15 months ago

+1 for removal, looks totally useless.

comment:3 nacin15 months ago

  • Milestone changed from Awaiting Review to 3.6

Have never noticed this.

comment:4 mboynes14 months ago

  • Cc mboynes added
  • Keywords has-patch needs-testing added

I agree, this is pretty useless. Sorry answers.com, no more free traffic for you.

I just added a patch that removes the button from the toolbar, but doesn't remove the functionality (in the event that someone uses it, this will allow them to add it back very easily). I moved the "close" button up in the array as well from key 140 to key 130.

mboynes14 months ago

Removing lookup button from quicktags array

comment:5 jonbishop14 months ago

Do we want to leave the functionality in there? I feel like it's easy enough to add back in as a plugin and why leave something like that hidden in core.

Also, don't we need to remove 'spell' from the quicktag settings anywhere we manually call the editor?

jonbishop14 months ago

This removes all references to 'spell' in quicktags args and the javascript that triggers the lookup

comment:6 sobkowicz14 months ago

  • Cc sobkowicz added

I tested this patch (by jonbishop) and it appears to work. I think taking out this functionality is fine as well.

SergeyBiryukov14 months ago

comment:7 SergeyBiryukov14 months ago

  • Keywords commit added; needs-testing removed

23322.patch looks good to me.

23322.2.patch removes a couple more references.

jonbishop14 months ago

jonbishop14 months ago

comment:8 follow-up: jonbishop14 months ago

  • Cc jonbish@… added

Incorporated the fixes from 23322.2.patch into 23322.3.patch which removes wordLookup from the localized quicktagsL10n array that gets added to the header in the admin.

comment:9 in reply to: ↑ 8 SergeyBiryukov14 months ago

I guess dictionaryLookup and lookup can be removed too.

jonbishop14 months ago

Removed dictionaryLookup and lookup

comment:10 nacin12 months ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 24052:

Remove ancient 'lookup' quicktag from the text editor. This had called up answers.com.

props mboynes, jonbishop, SergeyBiryukov.
fixes #23322.

comment:11 nacin12 months ago

I decided to leave qt.SpellButton = function() {]; in there, just to avoid potential JS errors with plugins.

Note: See TracTickets for help on using tickets.