php - saving domdocument with $VAR$ as form action -
as title suggests, trying save domdocument. domdocument has action, value $var$ however, upon saving of domdocument $ dollar signs escaped. how can prevent being escaped? regards, michel edit code:
$xpath = new domxpath($doc); $body = $xpath->query('//body')->item(0); $form = $doc->createelement('form'); $form->setattribute('action', '$portal_action$'); $form->setattribute('method', 'post'); $p = $doc->createelement('p'); $p->setattribute('style','text-align:center;'); $b = $doc->createtextnode('wifi code:'); $p->appendchild($b); $inputvoucher = $doc->createelement('input'); $inputvoucher->setattribute('name', 'auth_voucher'); $inputvoucher->setattribute('type', 'text'); $p->appendchild($inputvoucher); $inputredirurl = $doc->createelement('input'); $inputredirurl->setattribute('name', 'redirurl'); $inputredirurl->setattribute('type', 'hidden'); $inputredirurl->setattribute('value', '$portal_redirurl$'); $p->appendchild($inputredirurl); $inputsubmit = $doc->createelement('input'); $inputsubmit->setattribute('type','submit'); $inputsubmit->setattribute('name', 'accept'); $inputsubmit->setattribute('value', 'continue'); $p->appendchild($inputsubmit); $form->appendchild($p); $body->appendchild($form); return urldecode($doc->savehtml());
Comments
Post a Comment