Commit ad1143dd authored by Mitsuhiro Yoshida's avatar Mitsuhiro Yoshida Committed by Robert Lyon
Browse files

Bug 1836588: Fix errors japanese character encoding

behatnotneeded

Change-Id: Ie65a2da1c4a6dadb05fb46d00feefb39a09bd754
parent 9089a4c2
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1185,7 +1185,12 @@ class ArtefactTypeComment extends ArtefactType {
        $dom = new DOMDocument();
        $dom->preserveWhiteSpace = false;
        $dom->formatOutput = true;
        if (function_exists('mb_convert_encoding')) {
            $dom->loadHTML(mb_convert_encoding($comment, 'HTML-ENTITIES', 'UTF-8'));
        }
        else {
            $dom->loadHTML($comment, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
        }

        $xpath = new DOMXPath($dom);

+6 −1
Original line number Diff line number Diff line
@@ -28,6 +28,10 @@ Scenario: Moderating a group comment when approve comments is turned on
    And I enable the switch "Make comment public"
    And I press "Comment"
    Then I should see "You have requested that this comment be made public." in the "Comment feedbacktable" property
    # Check that multibyte comments render correctly
    And I set the field "Comment" to "これはUserCからのコメントです"
    And I enable the switch "Make comment public"
    And I press "Comment"
    And I log out

    # Checking that normal group member is not able to moderate comment
@@ -40,4 +44,5 @@ Scenario: Moderating a group comment when approve comments is turned on
    Given I log in as "UserA" with password "Kupuh1pa!"
    And I go to portfolio page "Page GroupA_01"
    Then I should see "This is a comment from UserC"
    And I press "Make comment public"
    And I should see "これはUserCからのコメントです"
    And I click on "Make comment public" in the "This is a comment from UserC" comment