[ 
https://issues.apache.org/jira/browse/NETBEANS-147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16790383#comment-16790383
 ] 

Alexander Schreiner edited comment on NETBEANS-147 at 3/12/19 9:32 AM:
-----------------------------------------------------------------------

NetBeans also formats PHP string literal content. This can lead to bugs when 
using PHP functions like header 
([https://secure.php.net/manual/de/function.header.php)]. 

 

Before: 
{code:java}
header('Location: /some/dir?parameter=value');
{code}
After: 
{code:java}
header('Location: /some/dir?parameter = value');
{code}
Expected:
{code:java}
header('Location: /some/dir?parameter=value');
{code}
 

Since spaces in URLs are encoded with %20, this leads to 404 Errors

 

*Product Version:* Apache NetBeans IDE 10.0 (Build 20190122-unknown-revn)

*Java:* 1.8.0_151; Java HotSpot(TM) 64-Bit Server VM 25.151-b12

*Runtime:* Java(TM) SE Runtime Environment 1.8.0_151-b12

*System:* Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)

*User directory:* C:\Users\AlexanderSchreiner\AppData\Roaming\NetBeans\10.0

*Cache directory:* C:\Users\AlexanderSchreiner\AppData\Local\NetBeans\Cache\10.0


was (Author: alexanderschreiner@seobility):
NetBeans also formats PHP string literal content. This can lead to bugs when 
using PHP functions like header 
([https://secure.php.net/manual/de/function.header.php)]. 

 

Before: 
{code:java}
header('Location: /some/dir?parameter=value');
{code}
After: 

 
{code:java}
header('Location: /some/dir?parameter = value');
{code}
Expected:
{code:java}
header('Location: /some/dir?parameter=value');
{code}
 

Since spaces in URLs are encoded with %20, this leads to 404 Errors

 

*Product Version:* Apache NetBeans IDE 10.0 (Build 20190122-unknown-revn)

*Java:* 1.8.0_151; Java HotSpot(TM) 64-Bit Server VM 25.151-b12

*Runtime:* Java(TM) SE Runtime Environment 1.8.0_151-b12

*System:* Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)

*User directory:* C:\Users\AlexanderSchreiner\AppData\Roaming\NetBeans\10.0

*Cache directory:* C:\Users\AlexanderSchreiner\AppData\Local\NetBeans\Cache\10.0

> Content in string literals are formatted by Format
> --------------------------------------------------
>
>                 Key: NETBEANS-147
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-147
>             Project: NetBeans
>          Issue Type: Bug
>          Components: cnd - Editor
>    Affects Versions: 8.2, 10.0
>            Reporter: Gunnar Grim
>            Priority: Critical
>              Labels: format, html
>
> When formatting an HTML page/PHP file, string literal content is formatted.
> Before formatting I had this attribute on a div in an Agular view:
> ng-class="($first ? '' : 'hidden-xs hidden-sm')"
> After formatting, NetBeans changed it into this:
> ng-class="($first ? '' : 'hidden - xs hidden - sm')"
> This is pretty serious IMO since the page presentation is messed up by 
> incorrect classes.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to