Closed okhayat closed 11 years ago
Do you have the same issue when you use regular oil scaffolding? fromdb calls the same methods to generate the code.
Yes, I didn't notice it before. This is a problem with oil scaffolding then
Can you give the exact oil command that you gave, so I can try to reproduce it? If have the output filter always on, but haven't observed this issue...
php oil r fromdb:scaffold tablename php oil g scaffold games name:string notes:text Both generated encoded files!
Looks fine here (1.6/develop). I've double checked, and I do have that output filter defined. This doesn't really suprise me, I would have expected a lot more complaints when this would be seriously broken.
What exactly is encoded when you use php oil g scaffold games name:string notes:text
? Can you paste an example? At no point is HTML passed to a view, so I don't see what there is to escape.
Here are the steps I've done:
Here's my ENV info: ossama@okstation:~/www/fueltest$ php -v PHP 5.3.10-1ubuntu3.5 with Suhosin-Patch (cli) (built: Jan 18 2013 23:40:19) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
ok, what I've done to try to reproduce it:
Second test:
Both 1.5/master and 1.6/develop have the output filter defined by default, so there should not be a reason to have to set it manually.
My local environment: PHP 5.4.11 (cli) (built: Jan 16 2013 16:46:12) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
Ok. It's fixed now.
When setting 'output_filter' => array('Security::htmlentities') in app/config.php and using fromdb task scaffolding, the output files are encoded. This shouldn't happen regardless of application configuration.