kadirahq / flow-router

Carefully Designed Client Side Router for Meteor
MIT License
1.09k stars 195 forks source link

"No route for path" when using iframe embeds #606

Open ffxsam opened 8 years ago

ffxsam commented 8 years ago

In an app I'm working on, a user can edit raw HTML descriptions to embed YouTube videos (iframe). I'm seeing this error in the console when I do that:

startup_client.js:26 There is no route for the path: /%22https://www.youtube.com/embed/essNmNOrQto/%22
kratam commented 8 years ago

I have the same problem. Did you find a solution?

kratam commented 8 years ago

Update: it seems the iframe doesnt have to be in the DOM. If a material-ui TextField contains a string with the embed code, flowrouter throws an error.

ffxsam commented 8 years ago

Never got a solution. What do you mean it doesn't have to be in the DOM? If something's not in the DOM, then it's not going to be displayed. Is material-ui the issue then?

kratam commented 8 years ago

I mean that the iframe wasn't rendered as an iframe in the DOM. The embed code (<iframe src="...") was only in the value of a (controlled) TextField, the string passed down as a prop. I'm not sure how FlowRouter gets into the way.

Update: Actually, inserting an iframe is not a problem - the error only occours if a controlled TextField contains an embed code with an iframe in it.

Update 2: Now this gets interesting: <iframe src="..."></iframe> not works, but <iframe src='...'> does.