Blade engine: print triple curly braces












10















I know how to print double curly braces in Laravel: @{{ }}.



But how can I print triple curly braces? My first thought of adding an @ before does not work, Laravel still tries to interpret it.



Is there an easy way without encoding the braces to HTML entities?










share|improve this question























  • can u provide an example of what you are trying to achieve (especially your current code snippet and the expected vs. real output)?

    – nozzleman
    Apr 14 '15 at 8:07













  • I want to print triple curly braces in a view. Wanted output: {{{text}}} Not working code: @{{{text}}}

    – Tim
    Apr 14 '15 at 8:15













  • This has been fixed in the framework. See my answer below for more information.

    – lukasgeiter
    Jul 12 '15 at 18:57
















10















I know how to print double curly braces in Laravel: @{{ }}.



But how can I print triple curly braces? My first thought of adding an @ before does not work, Laravel still tries to interpret it.



Is there an easy way without encoding the braces to HTML entities?










share|improve this question























  • can u provide an example of what you are trying to achieve (especially your current code snippet and the expected vs. real output)?

    – nozzleman
    Apr 14 '15 at 8:07













  • I want to print triple curly braces in a view. Wanted output: {{{text}}} Not working code: @{{{text}}}

    – Tim
    Apr 14 '15 at 8:15













  • This has been fixed in the framework. See my answer below for more information.

    – lukasgeiter
    Jul 12 '15 at 18:57














10












10








10


1






I know how to print double curly braces in Laravel: @{{ }}.



But how can I print triple curly braces? My first thought of adding an @ before does not work, Laravel still tries to interpret it.



Is there an easy way without encoding the braces to HTML entities?










share|improve this question














I know how to print double curly braces in Laravel: @{{ }}.



But how can I print triple curly braces? My first thought of adding an @ before does not work, Laravel still tries to interpret it.



Is there an easy way without encoding the braces to HTML entities?







laravel blade






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 14 '15 at 7:56









TimTim

4,71912758




4,71912758













  • can u provide an example of what you are trying to achieve (especially your current code snippet and the expected vs. real output)?

    – nozzleman
    Apr 14 '15 at 8:07













  • I want to print triple curly braces in a view. Wanted output: {{{text}}} Not working code: @{{{text}}}

    – Tim
    Apr 14 '15 at 8:15













  • This has been fixed in the framework. See my answer below for more information.

    – lukasgeiter
    Jul 12 '15 at 18:57



















  • can u provide an example of what you are trying to achieve (especially your current code snippet and the expected vs. real output)?

    – nozzleman
    Apr 14 '15 at 8:07













  • I want to print triple curly braces in a view. Wanted output: {{{text}}} Not working code: @{{{text}}}

    – Tim
    Apr 14 '15 at 8:15













  • This has been fixed in the framework. See my answer below for more information.

    – lukasgeiter
    Jul 12 '15 at 18:57

















can u provide an example of what you are trying to achieve (especially your current code snippet and the expected vs. real output)?

– nozzleman
Apr 14 '15 at 8:07







can u provide an example of what you are trying to achieve (especially your current code snippet and the expected vs. real output)?

– nozzleman
Apr 14 '15 at 8:07















I want to print triple curly braces in a view. Wanted output: {{{text}}} Not working code: @{{{text}}}

– Tim
Apr 14 '15 at 8:15







I want to print triple curly braces in a view. Wanted output: {{{text}}} Not working code: @{{{text}}}

– Tim
Apr 14 '15 at 8:15















This has been fixed in the framework. See my answer below for more information.

– lukasgeiter
Jul 12 '15 at 18:57





This has been fixed in the framework. See my answer below for more information.

– lukasgeiter
Jul 12 '15 at 18:57












5 Answers
5






active

oldest

votes


















10














This is the easiest way. Use HTML entities to escape curly braces. Tested in Laravel 5.
See here for the list of HTML entities. HTML Entities



Code



{{ '{{{' . 'text'. '}}}' }}


Output



{{{text}}}





share|improve this answer





















  • 4





    I'll just use {{{text}}} without the curly brackets. Seems to be the easiest solution to me. Thanks!

    – Tim
    Apr 14 '15 at 10:48











  • This doesn't work for me, it simply outputs the characters as they are escaped...

    – Petar Vasilev
    Apr 12 '18 at 9:53



















10














Update



Very recently, a pull request was merged that fixes this problem!!

As of Laravel 5.1.7 it is possible to use the @ sign as expected:



@{{{ ... }}}




Original Answer



The least ugly workaround I found up until now is to escape the first two brackets as normal and adding an invisible between them and the third bracket:



@{{‌{test}}}


I'll investigate further and update this answer if I find something better...






share|improve this answer

































    1














    Use this if you just want to print them:



    {{ '{{{' }}





    share|improve this answer
























    • Thanks for your superfast answer. But this is not working correctly: {{ '{{{text}}}' }}. Nothing gets printed.

      – Tim
      Apr 14 '15 at 8:00






    • 1





      Maybe a little weird but this works: {{ '{{{text' . '}' . '}' . '}' }}

      – Hamid Mohayeji
      Apr 14 '15 at 8:06





















    1














    I ran into the same issue trying to render some raw HTML using Vue.js in laravel 4.2. For me the easiest solution was to just to use a simple php echo statement in the blade template:



    <?php echo '{{{ text }}}'; ?>


    Did the trick for me.






    share|improve this answer
























    • Also if the php rendering engine still picks them up inside the echo (as ours did yesterday) you can break it up: <?php echo '{' . '{' . '{ text }' .'}' . '}'; ?> to pass {{{ text }}} to your JavaScript

      – Chris Adams
      Nov 3 '16 at 13:23



















    0














    One more way is as following



    {@{{Text}}}





    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29621970%2fblade-engine-print-triple-curly-braces%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      5 Answers
      5






      active

      oldest

      votes








      5 Answers
      5






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      10














      This is the easiest way. Use HTML entities to escape curly braces. Tested in Laravel 5.
      See here for the list of HTML entities. HTML Entities



      Code



      {{ '{{{' . 'text'. '}}}' }}


      Output



      {{{text}}}





      share|improve this answer





















      • 4





        I'll just use {{{text}}} without the curly brackets. Seems to be the easiest solution to me. Thanks!

        – Tim
        Apr 14 '15 at 10:48











      • This doesn't work for me, it simply outputs the characters as they are escaped...

        – Petar Vasilev
        Apr 12 '18 at 9:53
















      10














      This is the easiest way. Use HTML entities to escape curly braces. Tested in Laravel 5.
      See here for the list of HTML entities. HTML Entities



      Code



      {{ '{{{' . 'text'. '}}}' }}


      Output



      {{{text}}}





      share|improve this answer





















      • 4





        I'll just use {{{text}}} without the curly brackets. Seems to be the easiest solution to me. Thanks!

        – Tim
        Apr 14 '15 at 10:48











      • This doesn't work for me, it simply outputs the characters as they are escaped...

        – Petar Vasilev
        Apr 12 '18 at 9:53














      10












      10








      10







      This is the easiest way. Use HTML entities to escape curly braces. Tested in Laravel 5.
      See here for the list of HTML entities. HTML Entities



      Code



      {{ '{{{' . 'text'. '}}}' }}


      Output



      {{{text}}}





      share|improve this answer















      This is the easiest way. Use HTML entities to escape curly braces. Tested in Laravel 5.
      See here for the list of HTML entities. HTML Entities



      Code



      {{ '{{{' . 'text'. '}}}' }}


      Output



      {{{text}}}






      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited May 30 '16 at 6:07









      shankshera

      3751730




      3751730










      answered Apr 14 '15 at 10:08









      FaizFaiz

      86668




      86668








      • 4





        I'll just use {{{text}}} without the curly brackets. Seems to be the easiest solution to me. Thanks!

        – Tim
        Apr 14 '15 at 10:48











      • This doesn't work for me, it simply outputs the characters as they are escaped...

        – Petar Vasilev
        Apr 12 '18 at 9:53














      • 4





        I'll just use {{{text}}} without the curly brackets. Seems to be the easiest solution to me. Thanks!

        – Tim
        Apr 14 '15 at 10:48











      • This doesn't work for me, it simply outputs the characters as they are escaped...

        – Petar Vasilev
        Apr 12 '18 at 9:53








      4




      4





      I'll just use {{{text}}} without the curly brackets. Seems to be the easiest solution to me. Thanks!

      – Tim
      Apr 14 '15 at 10:48





      I'll just use {{{text}}} without the curly brackets. Seems to be the easiest solution to me. Thanks!

      – Tim
      Apr 14 '15 at 10:48













      This doesn't work for me, it simply outputs the characters as they are escaped...

      – Petar Vasilev
      Apr 12 '18 at 9:53





      This doesn't work for me, it simply outputs the characters as they are escaped...

      – Petar Vasilev
      Apr 12 '18 at 9:53













      10














      Update



      Very recently, a pull request was merged that fixes this problem!!

      As of Laravel 5.1.7 it is possible to use the @ sign as expected:



      @{{{ ... }}}




      Original Answer



      The least ugly workaround I found up until now is to escape the first two brackets as normal and adding an invisible between them and the third bracket:



      @{{&zwnj;{test}}}


      I'll investigate further and update this answer if I find something better...






      share|improve this answer






























        10














        Update



        Very recently, a pull request was merged that fixes this problem!!

        As of Laravel 5.1.7 it is possible to use the @ sign as expected:



        @{{{ ... }}}




        Original Answer



        The least ugly workaround I found up until now is to escape the first two brackets as normal and adding an invisible between them and the third bracket:



        @{{&zwnj;{test}}}


        I'll investigate further and update this answer if I find something better...






        share|improve this answer




























          10












          10








          10







          Update



          Very recently, a pull request was merged that fixes this problem!!

          As of Laravel 5.1.7 it is possible to use the @ sign as expected:



          @{{{ ... }}}




          Original Answer



          The least ugly workaround I found up until now is to escape the first two brackets as normal and adding an invisible between them and the third bracket:



          @{{&zwnj;{test}}}


          I'll investigate further and update this answer if I find something better...






          share|improve this answer















          Update



          Very recently, a pull request was merged that fixes this problem!!

          As of Laravel 5.1.7 it is possible to use the @ sign as expected:



          @{{{ ... }}}




          Original Answer



          The least ugly workaround I found up until now is to escape the first two brackets as normal and adding an invisible between them and the third bracket:



          @{{&zwnj;{test}}}


          I'll investigate further and update this answer if I find something better...







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jul 12 '15 at 18:56

























          answered Apr 14 '15 at 9:52









          lukasgeiterlukasgeiter

          86.6k15204195




          86.6k15204195























              1














              Use this if you just want to print them:



              {{ '{{{' }}





              share|improve this answer
























              • Thanks for your superfast answer. But this is not working correctly: {{ '{{{text}}}' }}. Nothing gets printed.

                – Tim
                Apr 14 '15 at 8:00






              • 1





                Maybe a little weird but this works: {{ '{{{text' . '}' . '}' . '}' }}

                – Hamid Mohayeji
                Apr 14 '15 at 8:06


















              1














              Use this if you just want to print them:



              {{ '{{{' }}





              share|improve this answer
























              • Thanks for your superfast answer. But this is not working correctly: {{ '{{{text}}}' }}. Nothing gets printed.

                – Tim
                Apr 14 '15 at 8:00






              • 1





                Maybe a little weird but this works: {{ '{{{text' . '}' . '}' . '}' }}

                – Hamid Mohayeji
                Apr 14 '15 at 8:06
















              1












              1








              1







              Use this if you just want to print them:



              {{ '{{{' }}





              share|improve this answer













              Use this if you just want to print them:



              {{ '{{{' }}






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Apr 14 '15 at 7:57









              Hamid MohayejiHamid Mohayeji

              96321225




              96321225













              • Thanks for your superfast answer. But this is not working correctly: {{ '{{{text}}}' }}. Nothing gets printed.

                – Tim
                Apr 14 '15 at 8:00






              • 1





                Maybe a little weird but this works: {{ '{{{text' . '}' . '}' . '}' }}

                – Hamid Mohayeji
                Apr 14 '15 at 8:06





















              • Thanks for your superfast answer. But this is not working correctly: {{ '{{{text}}}' }}. Nothing gets printed.

                – Tim
                Apr 14 '15 at 8:00






              • 1





                Maybe a little weird but this works: {{ '{{{text' . '}' . '}' . '}' }}

                – Hamid Mohayeji
                Apr 14 '15 at 8:06



















              Thanks for your superfast answer. But this is not working correctly: {{ '{{{text}}}' }}. Nothing gets printed.

              – Tim
              Apr 14 '15 at 8:00





              Thanks for your superfast answer. But this is not working correctly: {{ '{{{text}}}' }}. Nothing gets printed.

              – Tim
              Apr 14 '15 at 8:00




              1




              1





              Maybe a little weird but this works: {{ '{{{text' . '}' . '}' . '}' }}

              – Hamid Mohayeji
              Apr 14 '15 at 8:06







              Maybe a little weird but this works: {{ '{{{text' . '}' . '}' . '}' }}

              – Hamid Mohayeji
              Apr 14 '15 at 8:06













              1














              I ran into the same issue trying to render some raw HTML using Vue.js in laravel 4.2. For me the easiest solution was to just to use a simple php echo statement in the blade template:



              <?php echo '{{{ text }}}'; ?>


              Did the trick for me.






              share|improve this answer
























              • Also if the php rendering engine still picks them up inside the echo (as ours did yesterday) you can break it up: <?php echo '{' . '{' . '{ text }' .'}' . '}'; ?> to pass {{{ text }}} to your JavaScript

                – Chris Adams
                Nov 3 '16 at 13:23
















              1














              I ran into the same issue trying to render some raw HTML using Vue.js in laravel 4.2. For me the easiest solution was to just to use a simple php echo statement in the blade template:



              <?php echo '{{{ text }}}'; ?>


              Did the trick for me.






              share|improve this answer
























              • Also if the php rendering engine still picks them up inside the echo (as ours did yesterday) you can break it up: <?php echo '{' . '{' . '{ text }' .'}' . '}'; ?> to pass {{{ text }}} to your JavaScript

                – Chris Adams
                Nov 3 '16 at 13:23














              1












              1








              1







              I ran into the same issue trying to render some raw HTML using Vue.js in laravel 4.2. For me the easiest solution was to just to use a simple php echo statement in the blade template:



              <?php echo '{{{ text }}}'; ?>


              Did the trick for me.






              share|improve this answer













              I ran into the same issue trying to render some raw HTML using Vue.js in laravel 4.2. For me the easiest solution was to just to use a simple php echo statement in the blade template:



              <?php echo '{{{ text }}}'; ?>


              Did the trick for me.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jul 7 '16 at 0:08









              LyleKLyleK

              26125




              26125













              • Also if the php rendering engine still picks them up inside the echo (as ours did yesterday) you can break it up: <?php echo '{' . '{' . '{ text }' .'}' . '}'; ?> to pass {{{ text }}} to your JavaScript

                – Chris Adams
                Nov 3 '16 at 13:23



















              • Also if the php rendering engine still picks them up inside the echo (as ours did yesterday) you can break it up: <?php echo '{' . '{' . '{ text }' .'}' . '}'; ?> to pass {{{ text }}} to your JavaScript

                – Chris Adams
                Nov 3 '16 at 13:23

















              Also if the php rendering engine still picks them up inside the echo (as ours did yesterday) you can break it up: <?php echo '{' . '{' . '{ text }' .'}' . '}'; ?> to pass {{{ text }}} to your JavaScript

              – Chris Adams
              Nov 3 '16 at 13:23





              Also if the php rendering engine still picks them up inside the echo (as ours did yesterday) you can break it up: <?php echo '{' . '{' . '{ text }' .'}' . '}'; ?> to pass {{{ text }}} to your JavaScript

              – Chris Adams
              Nov 3 '16 at 13:23











              0














              One more way is as following



              {@{{Text}}}





              share|improve this answer




























                0














                One more way is as following



                {@{{Text}}}





                share|improve this answer


























                  0












                  0








                  0







                  One more way is as following



                  {@{{Text}}}





                  share|improve this answer













                  One more way is as following



                  {@{{Text}}}






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 1 at 8:16









                  umar_umar_

                  305414




                  305414






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29621970%2fblade-engine-print-triple-curly-braces%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Mossoró

                      Error while reading .h5 file using the rhdf5 package in R

                      Pushsharp Apns notification error: 'InvalidToken'