Tagged: Special characters
-
AuthorPosts
-
December 9, 2020 at 4:01 pm #1266019
Dear team Kriesi,
I really enjoyed using the enfold icon grid with images (I entered an image link instead of a title) and it worked great until the last update 4.7.6.4. Now a red message appears “Warning: Characters <,>, [,] might break ALB backend or frontend. Read more if you want to use them.”
I read and tried to replace characters:###lt###img src="https://www.domain.de/wp-content/uploads/2020/12/image.jpg"###gt###
But unfortunately the picture is no longer displayed.
Is there still a possibility to use the icon grid with pictures again?
Thanks in advantage!December 10, 2020 at 9:08 am #1266227Hey lenalavendel,
That message is only there to warn users that adding custom markup could break the layout builder, if your previous code worked then please add it back again and ignore the message.
Best regards,
RikardDecember 10, 2020 at 11:55 am #1266255Hi Rikard, the previous code no longer works since the update (WordPress and Theme). I checked the icon grid with images in other installations – up to Enfold 4.5.7. and WordPress 5.2.9 it still works.
I’ll send you the access in private, maybe you can take a look?December 14, 2020 at 6:48 am #1267033Hi,
Thank you for the update.
We have added the esc_html function in the latest version to properly escape html tags and prevent the builder structure or layout from breaking because of unclosed or invalid tags. You will have to modify the enfold\config-templatebuilder\avia-shortcodes\icongrid\icongrid.php file around line 1888 to be able to continue the use of images within the title field.
$output .= "<{$title_el} class='av_icongrid_title icongrid_title{$icongrid_title} {$av_title_font_classes} {$title_el_cls}' {$markup} {$title_styling_str}>" . esc_html( $atts['title'] ). "</{$title_el}>";
Best regards,
IsmaelJanuary 9, 2021 at 6:28 am #1271192Hi, I have also tried and this and it no longer works. I tried adding the code to that line on icongrid.php and it still does not work.
January 11, 2021 at 1:45 pm #1271590Hi,
Thank you for following up.
You do not need to add the whole line in the file. All you need to do is remove the esc_html function wrapping the title attribute, or this part.
esc_html( $atts['title'] )
It should be replaced with..
$atts['title']
Let us know if it works. Please do not forget to purge the cache or do a hard refresh before testing it.
Best regards,
IsmaelJanuary 12, 2021 at 4:45 am #1271728Hmmm, that did not work. So that line right now is:
$output .= "<{$title_el} class='av_icongrid_title icongrid_title{$icongrid_title} {$av_title_font_classes} {$title_el_cls}' {$markup} {$title_styling_str}>" . $atts['title'];
but that didn’t seem to have any effect. Any other thoughts on how to solve this? Thx.
January 12, 2021 at 6:30 pm #1271969Hi, still hoping I can get a response on this. So many themes have the flip boxes these days. It would be really nice to get this working. Otherwise I need to switch themes. Thx.
January 12, 2021 at 6:47 pm #1271973I changed the line like this:
$output .= "<{$title_el} class='av_icongrid_title icongrid_title{$icongrid_title} {$av_title_font_classes} {$title_el_cls}' {$markup} {$title_styling_str}>".$atts['title']."</{$title_el}>";
In your code, waterwalk, something missing at the end.
I have finally taken an old version of icongrid folder, beacuse the text under the images was missing at mobiles.As far as I can see it is not safe for updates. @Ismael / @Rikard is it possible that the Icongrid files work in my child theme or do I have to look for a new flip-box-option in the long term?
January 14, 2021 at 6:43 pm #1272509Hi,
@waterwalk: Please try to use the snippet or line that @lenalavendel provided above.
@lenalavendel: Thank you for the info. You should be able to override the default elements by creating another shortcode folder or path in the child theme directory. For more info on how to do that, please check the following documentation.// https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.