formats some html and returns it to the view. Anyway, in this helper
I have some divs. Something in cake is inserting "</div>" in my code
because I'm not doing it.
Any ideas?
Oh yes, I've used Santizie::html to dump out the HTML that's
generated. It looks fine. But when I look at the output in my
browser (view source) there's all kinds of stuff inserted I didn't put
in there.
The function (views/helpers/res.php)
function formatSection($ri, $count)
{
App::import('Sanitize');
$out = '<div id="formatSection{$count}">';
$out .= "after div";
$out .= 'this is crazy! <div id= "xyz">';
$out .= "<legend>{$ri['heading']}</legend>";
$out .= "<p>{$ri['yearsexp']} Years experience</p>\n";
$out .= "<br/><p>{$ri['description']}</p>\n";
$out .= "</div>";
$out .= "<a onClick=\"showEditSection({$count});\">Edit
section</a>\n";
#$out .= "\n".$this->Misc->div("editSection{$count}",'hide');
$out .= "\n".$this->Form->input("Resumeitem.{$count}.id", array
(
'type'=>'hidden',
'value'=>$ri['id'],
)
);
$out .= $this->Misc->br(1);
$out .= "\n".$this->Form->input("Resumeitem.{$count}.heading",
array( 'label'=>'Section
Heading',
'maxLength'=>100,
'size'=>100,
'value'=>$ri['heading'],
)
);
...
Here's what I end up seeing in my "view source" from the browser:
<div id="formatSection{$count}">after divthis is crazy! <div
id="xyz"></div>
</div><legend>Data and Application Management</legend><p>3 Years
experience</p>
<br><p>Experience with Storage Area Networks (SANS), large-scale,
multi-platform backups, assessing data availability and application
availability needs. Familiar with many tools and services available to
provide extremely low downtime for data and applications such as
network clusters and VMWare. </p>
</fieldset>
As you can see, I don't have a closing on my "</div>" until later on.
Yet something is inserting that in there immediately after I open the
<div>.
Anyone have any ideas what might be happening?
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment