This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 243277 - Closing brackets in strings are breaking variable tags in Twig
Summary: Closing brackets in strings are breaking variable tags in Twig
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Twig (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-26 07:38 UTC by naitsirch
Modified: 2014-07-23 02:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot showing the problem (6.57 KB, image/png)
2014-03-26 07:38 UTC, naitsirch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description naitsirch 2014-03-26 07:38:40 UTC
Created attachment 146323 [details]
Screenshot showing the problem

This is a valid statement: `{{ '{{ user.name }}' }}` and its output would look like that: "{{ user.name }}"

But NetBeans 8.0 interpretes the first closing brackets, which are just a part of the string and have no special meaning, as closing brackets for the variable tag. I have attached a screenshot which shows the problem.

This behaviour is a problem if you are using AngularJS in your template, where the same tags are used.

In NetBeans 7.4 this did not happen.
Comment 1 naitsirch 2014-03-26 07:40:42 UTC
A current workaround I am using is typing: "{{ '{{ user.name }\}' }}".
But this is a bit irritating, too :-(
Comment 2 Vladimir Riha 2014-04-04 08:52:24 UTC
reproducible

Product Version: NetBeans IDE Dev (Build 201404040001)
Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b70
Runtime: Java(TM) SE Runtime Environment 1.8.0-b132
System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)
Comment 3 Ondrej Brejla 2014-07-22 09:09:38 UTC
Fixed in web-main #a41d6a5a854f
Comment 4 Quality Engineering 2014-07-23 02:07:17 UTC
Integrated into 'main-silver', will be available in build *201407230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a41d6a5a854f
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #243277 - Closing brackets in strings are breaking variable tags in Twig