Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1352360

    I have a client who likes to copy/paste from Word — and they always paste i the invalid characters and then email about it.. Besides advising them to paste from Word or Plain Text in the WYSIWYG I added a filter for the the_content to deal with these invalid characters — Is there a filter I can add to the content from the layout builder? here is what I’m running on the_content

    add_filter('the_content','clean_text',1,1);
    
    function clean_text($content){
    
    	$content = iconv("UTF-8", "ISO-8859-1//TRANSLIT", $content);
    	return $content;
    }
    #1352375

    Hey integritive,

    Thank you for the inquiry.

    The elements in the Advance Layout Builder (ALB) are also saved as the default post or page content, so the builder content will also go through the same filter (the_content). Do you get any issues when using the ALB?

    You can also use the avia_builder_precompile filter and retrieve the builder content from a custom field named “_aviaLayoutBuilderCleanData”.

    $content = get_post_meta( get_the_ID(), '_aviaLayoutBuilderCleanData', true );
    

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.