탐색 건너뛰기

Open

Reported for: WPForms Multilingual 0.4.0

Topic Tags: Bug, Compatibility

Overview of the issue

When using WPForms, email notifications in translated forms lose regular line breaks, specifically when using ENTER key instead of HTML tags.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open your theme’s functions.php file.
  • Add the following code:
    add_filter('wpml_st_string_translation_before_save', 'sanitize_translation_before_save', 10, 1);
    
    function sanitize_translation_before_save($translation_text) {
    	$translation_text["value"] = str_replace("\n", "\r\n", $translation_text["value"]);
    	return $translation_text;
    }
    
  • Add some new content or a modification to the form. This will update the translation job and validate the workaround.

답장을 남겨주세요

주제를 유지하고 다른 사람을 존중하십시오. 이 게시물과 관련 없는 문제에 대한 도움이 필요한 경우 지원 포럼을 사용하여 채팅을 시작하거나 티켓을 제출하십시오.

다음 태그를 사용할 수 있습니다.
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>