Page MenuHomeIn-Portal Phabricator

INP-1562 - Don't overwrite template parameter value in <inp2:m_Param/> tag
ClosedPublic

Authored by alex on May 12 2016, 2:12 PM.

Details

Test Plan

Part 1 (regular usage)

<inp2:m_SetParam test_param="  \ value  "/>

[<inp2:m_Param name="test_param" js_escape="1"/>]
[<inp2:m_Param name="test_param"/>]
  1. create template with above content
  2. in browser go to page, that would render that template
  3. confirm, that template output contains: [ \\ value ] and [ \ value ]

Plan 2 ("plus" parameter usage)

<inp2:m_SetParam test_param="5"/>

[<inp2:m_Param name="test_param" plus="2"/>]
[<inp2:m_Param name="test_param" plus="3"/>]
  1. create template with above content
  2. in browser go to page, that would render that template
  3. confirm, that template output contains: [7] and [8]

Plan 3 ("plus" and "result_to_var" parameter usage)

<inp2:m_SetParam test_param="5"/>

<inp2:m_Param name="test_param" plus="2" result_to_var="xx1"/>
<inp2:m_Param name="test_param" plus="3" result_to_var="xx2"/>

[<inp2:m_Param name="xx1"/>]
[<inp2:m_Param name="xx2"/>]
  1. create template with above content
  2. in browser go to page, that would render that template
  3. confirm, that template output contains: [7] and [8]

Plan 4 ("result_to_var" parameter usage)

<inp2:m_SetParam test_param="  \ value  "/>

<inp2:m_Param name="test_param" js_escape="1" result_to_var="xx1"/>
<inp2:m_Param name="test_param" result_to_var="xx2"/>

[<inp2:m_Param name="xx1"/>]
[<inp2:m_Param name="xx2"/>]
  1. create template with above content
  2. in browser go to page, that would render that template
  3. confirm, that template output contains: [ \\ value ] and [ \ value ]

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint ErrorsExcuse: Don't care about CS issues in Template Parser in 5.2.x
SeverityLocationCodeMessage
Errorcore/kernel/nparser/ntags.php:408PHPCS.E.CodingStandard.Commenting.InlineComment.InvalidEndCharCodingStandard.Commenting.InlineComment.InvalidEndChar
Errorcore/kernel/nparser/ntags.php:408PHPCS.E.CodingStandard.Commenting.InlineComment.NotCapitalCodingStandard.Commenting.InlineComment.NotCapital
Errorcore/kernel/nparser/ntags.php:417PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:418PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:418PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:419PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:419PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:420PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:420PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:421PHPCS.E.Squiz.Strings.DoubleQuoteUsage.NotRequiredSquiz.Strings.DoubleQuoteUsage.NotRequired
Errorcore/kernel/nparser/ntags.php:422PHPCS.E.Squiz.Strings.DoubleQuoteUsage.NotRequiredSquiz.Strings.DoubleQuoteUsage.NotRequired
Errorcore/kernel/nparser/ntags.php:427PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:427PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:428PHPCS.E.Squiz.Strings.DoubleQuoteUsage.NotRequiredSquiz.Strings.DoubleQuoteUsage.NotRequired
Errorcore/kernel/nparser/ntags.php:432PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:432PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:435PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:435PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:438PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:438PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:441PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:441PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Errorcore/kernel/nparser/ntags.php:444PHPCS.E.Squiz.Strings.DoubleQuoteUsage.ContainsVarSquiz.Strings.DoubleQuoteUsage.ContainsVar
Warningcore/kernel/nparser/ntags.php:427PHPCS.W.Generic.Files.LineLength.TooLongGeneric.Files.LineLength.TooLong
Unit
No Unit Test Coverage
Build Status
Buildable 385
Build 385: arc lint + arc unit

Event Timeline

alex updated this revision to Diff 525.May 12 2016, 2:12 PM
alex retitled this revision from to INP-1562 - Don't overwrite template parameter value in <inp2:m_Param/> tag.
alex updated this object.
alex edited the test plan for this revision. (Show Details)
alex added 1 JIRA issue(s): INP-1562.
alex edited the test plan for this revision. (Show Details)May 12 2016, 2:21 PM
alex edited edge metadata.
alex edited the test plan for this revision. (Show Details)
alex edited the test plan for this revision. (Show Details)
glebs accepted this revision.May 13 2016, 1:48 AM
glebs edited edge metadata.
This revision is now accepted and ready to land.May 13 2016, 1:48 AM
This revision was automatically updated to reflect the committed changes.