Problem/Motivation

The translated values for quotes (") in plain text fields that are downloaded from Lingotek to Drupal 8 are being converted to HTML entities (") before being saved to the database. This seems to happen for Spanish, Italian and Portuguese.

Screenshot #1 Shows the segments in the Lingotek Workbench

Screenshot #2 Shows the field values in the database after being downloaded from Lingtotek to D8.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#126 2919849-htmlencoded-on-download-126.patch16.06 KBpenyaskito
#126 2919849-htmlencoded-on-download-126.only-tests.patch13.99 KBpenyaskito
#126 2919849-htmlencoded-on-download.interdiff.123-126.txt1.19 KBpenyaskito
#123 2919849-htmlencoded-on-download-123.patch17.04 KBpenyaskito
#123 2919849-htmlencoded-on-download-123.only-tests.patch14.49 KBpenyaskito
#123 2919849-htmlencoded-on-download.interdiff.120-123.txt1.18 KBpenyaskito
#120 2919849-htmlencoded-on-download-120.patch16.08 KBpenyaskito
#120 2919849-htmlencoded-on-download-120.only-tests.patch14.49 KBpenyaskito
#120 2919849-htmlencoded-on-download.interdiff.116-120.txt1.86 KBpenyaskito
#116 2919849-htmlencoded-on-download-116.patch14.22 KBpenyaskito
#116 2919849-htmlencoded-on-download-116.only-tests.patch12.62 KBpenyaskito
#114 2919849-htmlencoded-on-download-114.patch5.48 KBpenyaskito
#114 2919849-htmlencoded-on-download-114.only-tests.patch4.51 KBpenyaskito
#111 quotes_getting_converted-112.patch8.14 KBstephjoan1
#109 quotes_getting_converted-110.patch8.06 KBstephjoan1
#108 quotes_getting_converted-108.patch8.17 KBstephjoan1
#106 quotes_getting_converted-106.patch8.22 KBstephjoan1
#104 quotes_getting_converted-104.patch8.2 KBstephjoan1
#101 quotes_getting_converted-102.patch8.18 KBstephjoan1
#100 quotes_getting_converted-100.patch8.21 KBstephjoan1
#98 quotes_getting_converted-98.patch8.21 KBstephjoan1
#96 quotes_getting_converted-96.patch8.19 KBstephjoan1
#94 quotes_getting_converted-94.patch8.05 KBstephjoan1
#92 quotes_getting_converted-92.patch8.06 KBstephjoan1
#90 quotes_getting_converted-90.patch8.11 KBstephjoan1
#85 quotes_getting_converted-88.patch8.18 KBstephjoan1
#84 quotes_getting_converted-86.patch8.18 KBstephjoan1
#83 quotes_getting_converted-84.patch8.18 KBstephjoan1
#82 quotes_getting_converted-82.patch8.13 KBstephjoan1
#80 quotes_getting_converted-80.patch8.09 KBstephjoan1
#78 quotes_getting_converted-78.patch8.13 KBstephjoan1
#75 quotes_getting_converted-76.patch8.02 KBstephjoan1
#74 quotes_getting_converted-74.patch8.13 KBstephjoan1
#71 quotes_getting_converted-72.patch8.1 KBstephjoan1
#70 quotes_getting_converted-70.patch8.09 KBstephjoan1
#68 quotes_getting_converted-68.patch8.14 KBstephjoan1
#66 quotes_getting_converted-66.patch8.1 KBstephjoan1
#63 quotes_getting_converted-64.patch7.81 KBstephjoan1
#62 quotes_getting_converted-62.patch8.08 KBstephjoan1
#59 quotes_getting_converted-60.patch7.65 KBstephjoan1
#58 quotes_getting_converted-58.patch7.65 KBstephjoan1
#56 quotes_getting_converted-56.patch7.72 KBstephjoan1
#54 quotes_getting_converted-54.patch7.71 KBstephjoan1
#52 quotes_getting_converted-52.patch7.7 KBstephjoan1
#50 quotes_getting_converted-50.patch8.37 KBstephjoan1
#48 quotes_getting_converted-48.patch8.4 KBstephjoan1
#46 quotes_getting_converted-46.patch16.9 KBstephjoan1
#44 quotes_getting_converted-44.patch16.87 KBstephjoan1
#42 quotes_getting_converted-42.patch16.84 KBstephjoan1
#40 quotes_getting_converted-40.patch7.43 KBstephjoan1
#38 quotes_getting_converted-38.patch6.77 KBstephjoan1
#36 quotes_getting_converted-36.patch6.75 KBstephjoan1
#34 quotes_getting_converted-34.patch7.23 KBstephjoan1
#32 quotes_getting_converted-33.patch7.23 KBstephjoan1
#30 quotes_getting_converted-31.patch7.02 KBstephjoan1
#28 quotes_getting_converted-29.patch6.95 KBstephjoan1
#26 quotes_getting_converted-27.patch7.87 KBstephjoan1
#24 quotes_getting_converted-25.patch14.37 KBstephjoan1
#22 quotes_getting_converted-23.patch7.23 KBstephjoan1
#21 quotes_getting_converted-21.patch6.88 KBstephjoan1
#19 quotes_getting_converted-19.patch6.85 KBstephjoan1
#17 quotes_getting_converted-17.patch6.89 KBstephjoan1
#15 quotes_getting_converted-15.patch6.86 KBstephjoan1
#13 quotes_getting_converted-13.patch6.63 KBstephjoan1
#11 quotes_getting_converted-5.patch6.63 KBstephjoan1
#9 quotes_getting_converted-4.patch5.18 KBstephjoan1
#7 quotes_getting_converted-3.patch4.99 KBstephjoan1
#5 quotes_getting_converted-2.patch4.9 KBstephjoan1
#3 quotes_getting_converted-1.patch4.9 KBstephjoan1
lingotek-quotes-DB-view.png100.25 KBkrlucas
lingotek-quotes-workbench-view.png178.6 KBkrlucas
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

krlucas created an issue. See original summary.

t.murphy’s picture

@krlucas, thank you for reporting this issue. We will look into this

stephjoan1’s picture

Status: Active » Needs review
FileSize
4.9 KB
krlucas’s picture

Status: Needs review » Needs work

Thanks @stephjoan1!

+++ b/src/LingotekContentTranslationService.php
@@ -675,6 +675,7 @@ class LingotekContentTranslationService implements LingotekContentTranslationSer
+        $data['body'][0]['value'] = html_entity_decode($data['body'][0]['value']);

Seems like this would only fix issues with the "body" field. What about other text, long text fields?

+++ b/src/Tests/LingotekDatabaseFormattingTest.php
@@ -0,0 +1,119 @@
+    $this->assertIdentical($body, '"Llamas are very cool"');

Seems like this is only testing the "body" field.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
4.9 KB

Status: Needs review » Needs work

The last submitted patch, 5: quotes_getting_converted-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
4.99 KB

Status: Needs review » Needs work

The last submitted patch, 7: quotes_getting_converted-3.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
5.18 KB

Status: Needs review » Needs work

The last submitted patch, 9: quotes_getting_converted-4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
6.63 KB

Status: Needs review » Needs work

The last submitted patch, 11: quotes_getting_converted-5.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
6.63 KB

Status: Needs review » Needs work

The last submitted patch, 13: quotes_getting_converted-13.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
6.86 KB

Status: Needs review » Needs work

The last submitted patch, 15: quotes_getting_converted-15.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
6.89 KB

Status: Needs review » Needs work

The last submitted patch, 17: quotes_getting_converted-17.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
6.85 KB

Status: Needs review » Needs work

The last submitted patch, 19: quotes_getting_converted-19.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
6.88 KB
stephjoan1’s picture

Status: Needs review » Needs work

The last submitted patch, 22: quotes_getting_converted-23.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
14.37 KB

Status: Needs review » Needs work

The last submitted patch, 24: quotes_getting_converted-25.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
7.87 KB

Status: Needs review » Needs work

The last submitted patch, 26: quotes_getting_converted-27.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
6.95 KB

Status: Needs review » Needs work

The last submitted patch, 28: quotes_getting_converted-29.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
7.02 KB

Status: Needs review » Needs work

The last submitted patch, 30: quotes_getting_converted-31.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
7.23 KB

Status: Needs review » Needs work

The last submitted patch, 32: quotes_getting_converted-33.patch, failed testing. View results

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
7.23 KB

Status: Needs review » Needs work

The last submitted patch, 34: quotes_getting_converted-34.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
6.75 KB

Status: Needs review » Needs work

The last submitted patch, 36: quotes_getting_converted-36.patch, failed testing. View results

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
6.77 KB

Status: Needs review » Needs work

The last submitted patch, 38: quotes_getting_converted-38.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
7.43 KB

Status: Needs review » Needs work

The last submitted patch, 40: quotes_getting_converted-40.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
16.84 KB

Status: Needs review » Needs work

The last submitted patch, 42: quotes_getting_converted-42.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
16.87 KB

Status: Needs review » Needs work

The last submitted patch, 44: quotes_getting_converted-44.patch, failed testing. View results

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
16.9 KB

Status: Needs review » Needs work

The last submitted patch, 46: quotes_getting_converted-46.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.4 KB

Status: Needs review » Needs work

The last submitted patch, 48: quotes_getting_converted-48.patch, failed testing. View results

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.37 KB

Status: Needs review » Needs work

The last submitted patch, 50: quotes_getting_converted-50.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
7.7 KB

Status: Needs review » Needs work

The last submitted patch, 52: quotes_getting_converted-52.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
7.71 KB

Status: Needs review » Needs work

The last submitted patch, 54: quotes_getting_converted-54.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
7.72 KB

Status: Needs review » Needs work

The last submitted patch, 56: quotes_getting_converted-56.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
7.65 KB
stephjoan1’s picture

The last submitted patch, 58: quotes_getting_converted-58.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 59: quotes_getting_converted-60.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.08 KB
stephjoan1’s picture

The last submitted patch, 62: quotes_getting_converted-62.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 63: quotes_getting_converted-64.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.1 KB

#039;

Status: Needs review » Needs work

The last submitted patch, 66: quotes_getting_converted-66.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.14 KB

Status: Needs review » Needs work

The last submitted patch, 68: quotes_getting_converted-68.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.09 KB
stephjoan1’s picture

The last submitted patch, 70: quotes_getting_converted-70.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 71: quotes_getting_converted-72.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.13 KB
stephjoan1’s picture

The last submitted patch, 74: quotes_getting_converted-74.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 75: quotes_getting_converted-76.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.13 KB

Status: Needs review » Needs work

The last submitted patch, 78: quotes_getting_converted-78.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.09 KB

Status: Needs review » Needs work

The last submitted patch, 80: quotes_getting_converted-80.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.13 KB
stephjoan1’s picture

stephjoan1’s picture

stephjoan1’s picture

The last submitted patch, 82: quotes_getting_converted-82.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

The last submitted patch, 84: quotes_getting_converted-86.patch, failed testing. View results

The last submitted patch, 83: quotes_getting_converted-84.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 85: quotes_getting_converted-88.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.11 KB

Status: Needs review » Needs work

The last submitted patch, 90: quotes_getting_converted-90.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.06 KB

Status: Needs review » Needs work

The last submitted patch, 92: quotes_getting_converted-92.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.05 KB

Status: Needs review » Needs work

The last submitted patch, 94: quotes_getting_converted-94.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.19 KB

Status: Needs review » Needs work

The last submitted patch, 96: quotes_getting_converted-96.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.21 KB

Status: Needs review » Needs work

The last submitted patch, 98: quotes_getting_converted-98.patch, failed testing. View results

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.21 KB
stephjoan1’s picture

The last submitted patch, 100: quotes_getting_converted-100.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 101: quotes_getting_converted-102.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.2 KB

Status: Needs review » Needs work

The last submitted patch, 104: quotes_getting_converted-104.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.22 KB

Status: Needs review » Needs work

The last submitted patch, 106: quotes_getting_converted-106.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

Status: Needs work » Needs review
FileSize
8.17 KB
stephjoan1’s picture

The last submitted patch, 108: quotes_getting_converted-108.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

stephjoan1’s picture

The last submitted patch, 109: quotes_getting_converted-110.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 111: quotes_getting_converted-112.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

Status: Needs work » Needs review
FileSize
4.51 KB
5.48 KB

A new approach that works. Also tests.

The last submitted patch, 114: 2919849-htmlencoded-on-download-114.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

The last submitted patch, 116: 2919849-htmlencoded-on-download-116.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 116: 2919849-htmlencoded-on-download-116.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

penyaskito’s picture

The last submitted patch, 120: 2919849-htmlencoded-on-download-120.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 120: 2919849-htmlencoded-on-download-120.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

The last submitted patch, 123: 2919849-htmlencoded-on-download-123.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 123: 2919849-htmlencoded-on-download-123.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

The last submitted patch, 126: 2919849-htmlencoded-on-download-126.only-tests.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 126: 2919849-htmlencoded-on-download-126.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

penyaskito’s picture

Status: Needs work » Reviewed & tested by the community

Tests passed and failed as expected.

  • penyaskito committed 2c4b5fb on 8.x-2.x
    Issue #2919849 by stephjoan1, penyaskito, krlucas: Quotes getting...
penyaskito’s picture

Status: Reviewed & tested by the community » Fixed

Committed 2c4b5fb and pushed to 8.x-2.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.