Comments

edurenye created an issue. See original summary.

edurenye’s picture

Title: Escaped HTML in ConfigTranslateForm » Update ConfigTranslateForm
Issue summary: View changes
Related issues: +#2473853: Escaped HTML on node translate tab
dragos-dumi’s picture

Attached the patch for double encoding.

edurenye’s picture

Status: Active » Needs work
Issue tags: +Needs tests

This is fine.
Remember to change the status to Needs review when you upload a patch to make the test run.
There's more work in this issue: Also add the two new columns: Translation and Status
And we need a test to ensure that this is not going to change again.
Also when finished remember to add a screenshot as this is a UI change.

miro_dietiker’s picture

Sounds like a mixed issue...
First it is a bug (this issue) to make the label work properly, with the patch proposed. No screenshot needed here.

But adding extra columns should be a separate feature issue.

edurenye’s picture

Issue summary: View changes

Ok, you are right, those things are really different, I created a issue for adding the columns #2608070: Add Translation and Status columns in ConfigTranslateForm
But this still needs tests.

edurenye’s picture

Title: Update ConfigTranslateForm » Escaped HTML in ConfigTranslateForm
tduong’s picture

Status: Needs work » Needs review
StatusFileSize
new654 bytes

provided test coverage for Source label encoding

Status: Needs review » Needs work

The last submitted patch, 8: tmgmt_test_coverage_for_encoding_labelsource-2574935-08.patch, failed testing.

edurenye’s picture

Thats fine as a test only patch.
But when you add tests you have to add first a patch with the same name but ending with test_only.patch and then a patch with both solution and test in the same patch.
And both have to be in the same comment.
https://www.drupal.org/contributor-tasks/write-tests

sasanikolic’s picture

I don't think this test makes sense. You should assert if there is no Source inside strong HTML tags present in the table (specific: 1st row/3rd column) and that there is only "Source" now.

berdir’s picture

the assertRaw() is doing exactly that, it ensures that the <strong> tags are not escaped.

Yes, we could extend it to check the specific row where it is shown, but this would IMHO be enough for a regression test of this specific issue.

tduong’s picture

Ok, thanks for the suggestions :)

Uploaded patches:

  • interdiff of the two test coverage versions
  • new test only patch
  • patch with both solution and test

The last submitted patch, 13: tmgmt-fix-encoding-labelsource-config-form-2574935-12.patch, failed testing.

Status: Needs review » Needs work
berdir’s picture

that patch won't apply, the test change is an interdiff against the previous patch. And I don't think that change is even necessary.

tduong’s picture

Ok, now it should be correct ^^'

Updated patches.

Status: Needs review » Needs work
tduong’s picture

Status: Needs work » Needs review

changed patches order

  • Berdir committed e3f9f16 on 8.x-1.x authored by tduong
    Issue #2574935 by tduong, dragos.dumitrescu: Escaped HTML in...
berdir’s picture

Status: Needs review » Fixed
Issue tags: -Needs tests

Thanks, committed.

Status: Fixed » Needs work
berdir’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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