Proxy avatar urls broken in quotes with sub folder install

On a subfolder install site I noticed that the avatar letters were broken in quotes.

I don’t really know, but I think that Rails.root in line 124 needs to be replaced with Discourse.getURL (which makes me wonder about the other 71 files that refer to Rails.root)

https://github.com/discourse/discourse/blob/master/app/controllers/user_avatars_controller.rb#L124

3 Likes

What do you think @neil?

Yeah that’s probably the reason why. Added this to my list.

1 Like

Hmm no, it seems to be this:

https://github.com/discourse/discourse/blob/master/lib/pretty_text/shims.js#L45-L47

which is used in here and here.

I pushed a fix. @pfaffman Give it a try please.

3 Likes

It works!

Note to others: You’ll need to rebake after you do this upgrade to fix the avatars in existing posts. (I can’t find simple instructions for doing a simple rebake; doing rake posts:rebake_match["quote"] is probably better anyway rake posts:rebake_match["[quote"] might be better still, but it looks funny.)

3 Likes