Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I use wp_insert_post to import external data in WP3.8. Part of the post_content field is a small form, see below.

$content="<table><tbody><tr>";
$content.="<td><form action=\"http://www.mydomain.nl/solliciteren.html\" method=\"get\"><input type=\"hidden\" name=\"ref\" value=\"$reference\" /><input class=\"button\" type=\"submit\" value=\"Solliciteer naar deze functie\" /></form></td>";
$content.="</tr></tbody></table>"; 

When I echo this it looks fine, but after using wp_insert_post to import it I get the following result:

<table>
<tbody>
<tr>
<td>
<form action='http://www.mydomain.nl/solliciteren.html' method='get'></form>
</td>
</tr>
</tbody>
</table>

My question is: does anyony has a clue where my hidden field and button have gone? I think it has something to do with filtering, but (if that's the case) how can I prevent that in a save way?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.