开发者

TM symbol not displaying correctly on redirected URL

开发者 https://www.devze.com 2022-12-17 21:27 出处:网络
I have a url that redirects to a page on my main site. For some reason, when I access through the rewritten URL, a TM symbol is showing up as â¢, but when I access through the main site, it shows up

I have a url that redirects to a page on my main site. For some reason, when I access through the rewritten URL, a TM symbol is showing up as â¢, but when I access through the main site, it shows up correctly.

The urls are http://waterlessmilkwarmer.com/ and http://www.medelabreastfeedingus.com/milk-warmer so you can see what's happening. They are both looking at exactly the same page (the first url redirects to the second). Look at the page title ("Introducing the first and only...") to see what's happening.

The site is running on .NET and that page title is being stored and pulled directly from the database. There are HTMLEncode calls on it, but when I removed them and just displayed it directly from the database, it still did the same thing.

I'm guessing the redirected url has something to do with this, but I don't know what. Has anyo开发者_运维百科ne seen this before and know what could be happening?


If you look at the page properties in Firefox, the rendering mode of the two pages is different.

medelabreastfeedingus.com -> Standards compliance mode
waterlessmilkwarmer.com -> Quirks mode

I suspect that this is what is causing the difference. The different rendering mode is possibly triggered by the <base href="http://www.medelabreastfeedingus.com/" /> tag that is rendered outside of the <html> tags, and also before the <DOCTYPE> tag - my HTML validator says that the doctype tag cannot appear after other elements.

You could try using the HTML entity instead (&trade; will render as ™) - that should work in both modes.


I don't know why that's happening (definitely weird) but I did notice that you're using the actual character instead of the HTML encoding version &trade; which would work regardless.


It turns out that there was an issue with the TM symbol in the database. Once it was removed and added back in, everything seems to work fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消