Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Volt filter escape_attr - v5.0.0beta1 #15853

Closed
phptux opened this issue Jan 5, 2022 · 2 comments
Closed

[BUG]: Volt filter escape_attr - v5.0.0beta1 #15853

phptux opened this issue Jan 5, 2022 · 2 comments
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Comments

@phptux
Copy link

phptux commented Jan 5, 2022

Hey Phalcon Team,

I am using the Volt filter escape_attr.

Simple example:

<meta charset="{{ charset | escape_attr }}"/>

I get the following error message:

Call to undefined method Phalcon\Html\Escaper::attr()

In the file Mvc/View/Engine/Volt/Compiler.zep on the line 2519 I find the following code:

/**
 * "escape_attr" filter uses the escaper component to escape HTML
 * attributes
 */
if name == "escape_attr" {
    return "$this->escaper->attr(" . arguments . ")";
}

In the Phalcon version 4.2.x I find in the same file Mvc/View/Engine/Volt/Compiler.zep this code on line 2397:

/**
 * "escape_attr" filter uses the escaper component to escape HTML
 * attributes
 */
if name == "escape_attr" {
    return "$this->escaper->escapeHtmlAttr(" . arguments . ")";
}

Please can you change this bug?

Thank you very much and please keep it up. You are a great team.

Details

  • Phalcon version: (v5.0.0beta1)
  • PHP Version: (8.0.14)
  • Operating System: Linux Mint
  • Installation type: Compiling from source
  • Zephir version: 0.15.2
  • Server: Apache
@phptux phptux added bug A bug report status: unverified Unverified labels Jan 5, 2022
@niden niden added 5.0 The issues we want to solve in the 5.0 release status: medium Medium and removed status: unverified Unverified labels Jan 5, 2022
@niden niden self-assigned this Jan 5, 2022
@niden niden mentioned this issue Jan 5, 2022
5 tasks
@niden
Copy link
Member

niden commented Jan 5, 2022

@phptux Thank you for reporting this. There is a PR ready, once it gets merged it will be in Beta 2 (releasing probably tonight or tomorrow).

@niden
Copy link
Member

niden commented Jan 6, 2022

This has been resolved in #15854

@niden niden closed this as completed Jan 6, 2022
@niden niden added this to Phalcon v5 Aug 25, 2022
@niden niden moved this to Implemented in Phalcon v5 Aug 25, 2022
@niden niden moved this from Implemented to Released in Phalcon v5 Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium
Projects
Archived in project
Development

No branches or pull requests

2 participants