spohlenz / tinymce-rails

Integration of TinyMCE with the Rails asset pipeline
Other
812 stars 256 forks source link

Usage of <form> tag inside editor (as content) fails on submit #178

Open Gustavo opened 8 years ago

Gustavo commented 8 years ago

Hi

I'm not sure if this is a bug or me not knowing what i'm doing... I want to add a payment button to a page that I edit with tinymce. I go to source of the page, past the html content. Change to WYSIWYG view, button looks good. Then hit save. I'm redirected to a "data:," url. When I go back to view the page I edited, everything looks good, content was saved, btn works as expected. So my question (or bug report) is: Why when hitting save with the html btn code I get redirected to "data:," (and not to the page view as expected)?

Here is the code of the btn:

<!-- INICIO FORMULARIO BOTAO PAGSEGURO -->
<form action="https://pagseguro.uol.com.br/checkout/v2/payment.html" method="post" onsubmit="PagSeguroLightbox(this); return false;">
<!-- NÃO EDITE OS COMANDOS DAS LINHAS ABAIXO -->
<input type="hidden" name="code" value="XXXXXXXXXXX" />
<input type="image" src="https://p.simg.uol.com.br/out/pagseguro/i/botoes/pagamentos/209x48-pagar-azul-assina.gif" name="submit" alt="Pague com PagSeguro - é rápido, grátis e seguro!" />
</form>
<script type="text/javascript" src="https://stc.pagseguro.uol.com.br/pagseguro/api/v2/checkout/pagseguro.lightbox.js"></script>
<!-- FINAL FORMULARIO BOTAO PAGSEGURO -->