shane-tomlinson / browserid-wordpress

Wordpress plugin that adds Persona authentication
23 stars 16 forks source link

siteLogo issues #47

Closed ozten closed 11 years ago

ozten commented 11 years ago

I set a site logo to https://ozten.com/i/avatar.jpg

This doesn't work for several reasons.

wp_localize_script changes this value to https:\/\/ozten.com\/i\/avatar.jpg which blows up in Persona.

So I hacked login.js to replace('\\', '').

Now I see watch being called with https://ozten.com/i/avatar.jpg, but oddly the dialog still dies with

ozten commented 11 years ago

I'm dumb... ignore the https://ozten.com part.

Being an absolute URL, it still get's escaped, as you can see if you view source on a page.

shane-tomlinson commented 11 years ago

@ozten, once you removed the domain, did the siteLogo show correctly? Mine is working as expected in all the browsers I have tested.

ozten commented 11 years ago

My wordpress install still does this:

siteLogo: "\/avatar.jpg"

The weird escaping.

shane-tomlinson commented 11 years ago

@ozten - thanks, does the logo show, or can the escaping be safely ignored?

ozten commented 11 years ago

Logo does not show. I've edited the source as a stop gap, until I figure out which plugin or ??? is causing this.

shane-tomlinson commented 11 years ago

@ozten - thanks for checking, this is strange. For me, it shows the /\ as well, but I see the siteLogo. :/ I'll modify the JS to strip out the extra escaping, the problem stems from the way WordPress escapes everything passed to scripts.