Page MenuHomeIn-Portal Phabricator
  • Changed Files
  • branches/5.2.x/core/kernel/nparser/ntags.php

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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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.