Giter Site home page Giter Site logo

Comments (5)

xfra35 avatar xfra35 commented on July 18, 2024

I forgot to mention that it concerns also e-mail addresses since the @ sign also belongs to the same check procedure. E.g:

F3::set('_str1','E-mail:');
F3::set('_str2','[email protected]');
echo F3::resolve('{{@_str1}} {{@_str2}}');

will output E-mail: '[email protected]'

from fatfree.

ikkez avatar ikkez commented on July 18, 2024

This is a known issue. See https://groups.google.com/forum/#!topic/f3-framework/0I4oth-eojY for more information on Google Group.

from fatfree.

xfra35 avatar xfra35 commented on July 18, 2024

Sorry I didn't see it. Anyway there's no mention in that post of the problem with the word 'new'.
Could you (or somebody else) explain the purpose of the following test in F3::resolve ?

!preg_match('/@|\bnew\s+/i',$out)

I'm probably wrong but here's how I see it :

  • concerning the '@' test, it seems to be here to prevent evaluating expressions containing F3 variables, although the @-starting F3 variables are handled by the previous preg_replace_callback and therefore should never appear in $out.
  • concerning the 'new' test, it looks like an attempt to prohibit object instantiation within templates in order to stick to MVC principles. If that's the case, the benefit of this control has to be balanced against the impossibility of using the word 'new' in the dictionary.

from fatfree.

bcosca avatar bcosca commented on July 18, 2024

Please let me know if the latest commit provides finality on this issue

from fatfree.

xfra35 avatar xfra35 commented on July 18, 2024

Yes, it's fixed now. Thanks !

from fatfree.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.