Closed (fixed)
Project:
Custom Tokens
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2011 at 15:38 UTC
Updated:
12 Sep 2012 at 14:39 UTC
Jump to comment: Most recent file

Comments
Comment #1
robloachExposing PHP to the end user is definitely not a good idea. This patch makes it use filters instead. The upgrade path is supported.
Comment #1.0
robloachUpdated issue summary.
Comment #2
dave reidHow does this work if $options['sanitize'] = FALSE is provided from token_replace()?
Comment #3
dave reidAside from #2, I think this is a *great* change. Easily allows 'simple' tokens while also allowing the complex PHP tokens.
Comment #4
gaspaio commentedOk thanks. This change was actually on my short term roadmap, i totally agree with the fact that a default PHP field is a nono.
I'll check your patch over the weekend ; i'm curious to see how you pass the $data array to the filter when php filter is on.
Thanks.
Comment #5
gaspaio commentedAdded a few changes to your patch : the $data and $options arrays are now available to the evaluated php code (if php filter is used). It should solve #2 and keep the current features.
Comment #6
gaspaio commentedJust commited latest patch to the newly created dev release.
The issue remains open for a while since this still needs some testing.
Thanks.
Comment #7
gaspaio commentedSince this is a major change, that might not please all of the module's users, this patch was moved to the a new version branch - 7.x-2.x (it should be visible in a few hours).
Version 7.x-1.x will keep the old PHP-only approach and receive bug fixes only.
Comment #8
gaspaio commentedComment #8.0
gaspaio commentedUpdated issue summary.