rails redirects to 'data:,' -
in app, i'm saving input of html 'page' so:
def create @page = page.new(page_params) @page.unique = loop random_unique = securerandom.urlsafe_base64(4) break random_unique unless page.where(unique: random_unique).exists? end @page.save redirect_to "/#{@page.unique}" end but if include functionality in tags, says it's rendered page, in fact returns nothing, url bar showing 'data:,'
strangely, if find @page.unique, , visit afterwards, e.g. localhost:3000/skkfra page renders fine.
any suggestions?
p.s. here's show method i'm using:
def show @page = page.find_by(unique: params[:id]) render :text => @page.html end
i found answer on irc.
this security feature, html content of new page matches html content of submitted form, chrome blocks.
Comments
Post a Comment