0
Welcome Guest! Login
0 items Join Now

Use safe_email in Block Content Description

    • Jan's Avatar
    • Jan
    • Newbie
    • Posts: 7
    • Thanks: 0

    Use safe_email in Block Content Description

    Posted 1 year 11 months ago
    • I would like to use safe_email as part of a Block Content Description. This is the code:
      <a href="mailto:{{'user@test.com'|safe_email}}"> <i class="fa fa-at"></i></a>

      Unfortunately, this does not work (i.e., the email address is not turned into ASCII characters). Twig processing is turned on (and when I add the same code to the Page Content it works).

      Is there a way to make this work for a Block Content Description?

      Thank you,
      Jan
    • Last Edit: 1 year 11 months ago by Jan.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22449
    • Thanks: 2671
    • Web Developer

    Re: Use safe_email in Block Content Description

    Posted 1 year 11 months ago
    • Jan's Avatar
    • Jan
    • Newbie
    • Posts: 7
    • Thanks: 0

    Re: Use safe_email in Block Content Description

    Posted 1 year 11 months ago
    • Thank you for your quick reply. I'm still creating the site, so I'm afraid it's not online yet. I've created a screenshot that will hopefully make it a bit clearer what I'm trying to achieve:


      This image is hidden for guests.
      Please log in or register to see it.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22449
    • Thanks: 2671
    • Web Developer

    Re: Use safe_email in Block Content Description

    Posted 1 year 10 months ago
    • Jan's Avatar
    • Jan
    • Newbie
    • Posts: 7
    • Thanks: 0

    Re: Use safe_email in Block Content Description

    Posted 1 year 10 months ago
    • Thank you for your reply. I'm now trying to use a Custom HTML particle instead. I've made sure that both "Process Twig" and "Process shortcodes" are ticked[1]. However, I still can't get it to work. It seems that this problem is independent of safe_email. Even something simple such as [raw]
      This is centered
      [/raw] does not work inside the Custom HTML particle. On the other hand, when I enter the same shortcode in "Page Content" it does work.

      Grav: 1.4.7
      Gantry: 5.4.24
      Shortcode Core: 2.7.1

      [1] What is slightly confusing though is that I see two tickboxes for Twig and shortcodes each, which can be ticked and unticked independently (see attached image).

      This image is hidden for guests.
      Please log in or register to see it.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22449
    • Thanks: 2671
    • Web Developer

    Re: Use safe_email in Block Content Description

    Posted 1 year 10 months ago
    • Jan's Avatar
    • Jan
    • Newbie
    • Posts: 7
    • Thanks: 0

    Re: Use safe_email in Block Content Description

    Posted 1 year 9 months ago
    • Sorry, any news from the devs?
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22449
    • Thanks: 2671
    • Web Developer

    Re: Use safe_email in Block Content Description

    Posted 1 year 9 months ago

Time to create page: 0.102 seconds