WordPress.org

GlotPress

Opened 4 years ago

Closed 4 years ago

#71 closed defect (fixed)

Wrong codes in translation field when copying from original or using google translator

Reported by: irdb Owned by: somebody
Milestone: 1.0 Priority: normal
Version: Component: interface
Keywords: Cc:

Description

Wrong codes in translation field when using "Copy from original" or "Translation from Google" links. Here is a picture:
http://fractol.files.wordpress.com/2010/02/capture.png

As you can see, the new line character (↵) is copied like this:

<span class="invisibles" title="New line">↵</span>

If we add this translation, a warning is generated:
Warning: Too many tags in translation.

Same thing goes for greater than and less than signs:

>
&gt

<
&lt

and a few other symbols, like:

&
&amp;

Attachments (1)

glotpress.png (4.8 KB) - added by c00l2sv 4 years ago.
html entities should not be escaped

Download all attachments as: .zip

Change History (14)

comment:1 irdb4 years ago

  • Priority changed from normal to major

c00l2sv4 years ago

html entities should not be escaped

comment:2 nbachiyski4 years ago

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

(In [474]) Switch to .html() for setting textareas contents. .val() was expecting to see the text and double-escaped the result of other jQuery.prototype.html. Fixes #71

comment:3 irdb4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

I still have problem, so I reopen the topic.
http://dalba.files.wordpress.com/2010/04/capture.png

comment:4 nbachiyski4 years ago

The change still wasn't deployed on translate.wordpress.(com|org). Could you confirm that it works now?

comment:6 nbachiyski4 years ago

Could you hard refresh if any Javascript is still loaded from cache. It works for me on both Firefox and Safari.

comment:7 irdb4 years ago

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

I had to clear the cache. Now works fine. Thanks!

comment:8 irdb4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:10 nbachiyski4 years ago

I can't reproduce those. What browser and version are you using?

comment:11 irdb4 years ago

I'm using Firefox 3.6.3 (tested on both Ubuntu and windows 7)

Also noticed that in Chrome, the code is copied correctly, but not in Firefox.
I don't have access to IE(8) right now, but I think it was the same as Firefox.

comment:12 nbachiyski4 years ago

  • Component changed from general to interface
  • Milestone set to 1.0
  • Priority changed from major to normal

comment:13 nbachiyski4 years ago

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

[510] removes all these spans on copy and fixes the bug.

Note: See TracTickets for help on using tickets.