Wednesday, July 01, 2009

<Blogger> 模板标签生成奇怪 Javascript

昨天由于有新的评论,有一篇帖子的页面被重新生成,然后页面就出现了一些奇怪的问题。仔细查看源代码后,发现在生成页面的时候,模板里面所有的 </Blogger> 标签的画面,都被加上了一段奇怪的 JavaScript 代码:
<script type="text/javascript" src="http://www.blogger.com/static/v1/common/js/327583163-csitaillib.js"></script>
<script>if (typeof(window.attachCsiOnload) != 'undefined' && window.attachCsiOnload != null) { window.attachCsiOnload('ext_blogspot'); }</script>

重新发布了几次仍然是这样,因此推测可能是 Blogger 做了更新。在 Google 上搜索了一下,发现很多 Classic Template 的使用者都发现了相同的问题,并且报告在 Blogger 的 Google Groups 帮助讨论组,如这篇帖子,还有这里,以及这里。虽然有很多网友提出了各种临时的解决办法,但看起来都不尽如人意。

个人认为 Blogger 这个新的功能添加得不够专业。先且不论是什么功能,光是直接在</Blogger> 标签后加入 <Script> 就不可取,因为 Blogger 这一对标签里面包括和帖子相关的数据,页面上凡是需要帖子标题、ID、时间等相关信息的地方都会用到这一对标签,它可能出现在标题、正文甚至其它的 JavaScript 中(例如我就需要通过这对标签取得帖子的 ID 并作为参数传给 JavaScript 函数)。

目前暂时通过人工编辑 HTML 去掉了相关的 Script,如果近期 Blogger 不能解决这个问题的话,就只有另外写 PHP 程序来自动处理了。

Update July. 2, 2009:

这篇帖子中一位来自 The Blogger Team 的用户提到,这的确是他们发现的一个 bug,将很快被修复。让我们拭目以待吧……

Update July. 8, 2009:
这位来自 The Blogger Team 的用户提到,他们已经在 Blogger 的 Known Issues 网站上记录了这一问题以便跟踪。从该帖内容来看,他们只认为问题只出在不该在 <title></title> 之间输出 script 内容。难道他们不知道这一对 <Blogger></Blogger> 还可能用在用户自己定义的 JavaScript 中吗?

20 comments:

笨乌不飞 said...

很佩服您的手动能力,拜读了您不少文章,似乎您这个博客就是为了让我们惊讶于“啊 Blogger 居然在天朝还可以访问啊!”而诞生的。

呵呵。

G said...

我看你网页源代码里没有这段奇怪的JavaScript,请问你是怎么去掉相关的 Script?

Kang said...

请问你是用 这样的方法解决的么?你是怎样让博客标题在你文章题目后面的?

Gregory said...

@G, 我是在页面被发布后,用PHP扫描所有的页面,用正则表达式把所有的奇怪 JavaScript 去掉了……

@Kang, 将模板 title 那个地方写成下面这样就可以了:即,Main 和 Archive 页面,直接显示博客名称,Item 页显示成“文章标题 - 博客名称”的形式。

<MainOrArchivePage>
<title><$BlogPageTitle$></title>
</MainOrArchivePage>
<ItemPage>
<Blogger><title><$BlogItemTitle$> - <$BlogTitle$></title></Blogger>
</ItemPage>

Coach Factory said...

coach factory, oakley sunglasses, polo ralph lauren outlet, kate spade outlet, michael kors, ray ban sunglasses, michael kors outlet, louboutin, ray ban, longchamp, louis vuitton handbags, air jordan, louboutin, prada handbags, gucci outlet, oakley sunglasses, prada outlet, coach outlet store, nike shoes, louis vuitton, polo ralph lauren, air max, michael kors outlet, louboutin, michael kors outlet, toms shoes, tory burch outlet, burberry outlet online, tiffany and co, air max, jordan shoes, nike air max, coach outlet, true religion jeans, oakley sunglasses, ray ban sunglasses, burberry outlet online, nike free, michael kors, true religion outlet, louis vuitton outlet online, true religion, chanel handbags, polo ralph lauren outlet, coach purses, nike air max, nike free, ralph lauren, longchamp outlet

Coach Factory said...

oakley outlet, moncler outlet, oakley vault, rayban, ray-ban, canada goose outlet, oakley vault, oakley sunglasses cheap, cheap sunglasses, cheap oakley, ugg boots, ugg, ray ban, ralph lauren, oakley vault, ray ban outlet, raybans, ray ban, cheap sunglasses, ray ban sunglasses outlet, louboutin, oakley, cheap sunglasses, canada goose, canada goose, canada goose, cheap oakley sunglasses, cheap oakley sunglasses, ray bans, oakley sunglasses outlet, oakley sunglasses cheap, oakley sunglasses outlet, discount oakley sunglasses, ray ban, ray bans, rayban, cheap oakley sunglasses, tn pas cher, ray ban outlet, oakley outlet, oakley outlet, moncler, oakley sunglasses outlet, canada goose, gucci, moncler, moncler, canada goose outlet, oakley sunglasses cheap

Coach Factory said...

ferragamo shoes, supra shoes, abercrombie and fitch, ray ban pas cher, wedding dresses, nfl jerseys, reebok outlet, hermes, juicy couture outlet, air max, lululemon, p90x, ghd, timberland, mulberry, lancel, hogan, new balance shoes, birkin bag, mont blanc, asics, nike air max, ugg boots, soccer jerseys, hollister, rolex watches, north face outlet, beats by dre, montre pas cher, nike free, louis vuitton, ugg boots, herve leger, chi flat iron, vans, ralph lauren, oakley pas cher, jimmy choo, insanity, converse shoes, louis vuitton, karen millen, celine handbags, bottega veneta, marc jacobs, soccer shoes, mcm handbags, yoga pants, burberry, valentino shoes

jim kill said...

louis vuitton handbags
burberry scarf
ray ban sunglasses outlet
michael kors
cheap uggs
cheap oakleys
abercrombie fitch
ugg boots
tory burch flats
lv outlet
tods outlet
michael kors handbags
michael kors outlet online
ghd flat iron
coach outlet
coach factory online
prada handbags
lebron 11
canada goose jacket
ray ban outlet
christian louboutin
chanel handbags
coach outlet
polo outlet
michael kors outlet online
ray ban canada
coach factory outlet
20150311huangqihang

mao yun said...

3
michael kors handbags
louis vuitton uk
oakley outlet
nba jerseys wholesale
pandora
fitflop shoes
cheap nhl jerseys
adidas wings
michael kors outlet
replica watches
cheap snapbacks
karen millen sale
coach outlet store online
hollister
nhl jerseys wholesale
air jordan concord
kate spade uk
coach outlet
insanity workout
pandora jewelry
lacoste outlet
tiffany jewelry
michael kors outlet store
cheap mlb jerseys
true religion outlet
tory burch outlet online
soccer jerseys for sale
thomas sabo bracelet
louis vuitton outlet online
valentino sale
asics running shoes
burberry outlet
christian louboutin shoes
hollister clothing
air jordan shoes
giuseppe zanotti sale
longchamp handbags
michael kors handbags
tiffany and co
louboutin shoes
cheap ray ban sunglasses
20150330maoqiuyun

Guo Guo said...

air max 90
bottega veneta outlet
nike air max uk
nike huarache
custom mlb jerseys
surpa sneakers
coach outlet
seattle seahawks jerseys
the north face uk
kansas city chiefs jerseys
nike outlet store
atlanta falcons jersey
chanel handbags
green bay packers jerseys
michael kors uk
los angeles clippers jerseys
burberry outlet
dallas cowboys jersey
nike running shoes
arizona cardinals jerseys
oakley sunglasses canada
the north face outlet
oakley sunglasses
real madrid jersey
cleveland cavaliers jersey
pittsburgh steelers jersey
north face jackets
soccer shoes
mizuno running
san francisco 49ers jerseys
dansko outlet
new orleans saints jerseys
new york jets jerseys
air jordan shoes
los angeles lakers jerseys
north face outlet
mulberry uk
hermes belt
stuart weitzman boots
washington redskins jerseys
wei20150610

Xiaozhengmm 123 said...

2015-7-28 xiaozhengm
christian louboutin sale
polo ralph lauren outlet
longchamp outlet
michael kors handbags
coach factory outlet
replica watches cheap
ed hardy
pandora rings
tory burch shoes
ralph lauren outlet
soccer jerseys wholesale
michael kors handbag
prada handbags
cheap ray ban sunglasses
chanel outlet
hollister clothing store
burberry outlet online
tory burch outlet
cheap jerseys
tory burch outlet online
cheap jordans
ray ban outlet
coach outlet online
air max 90
ralph lauren uk
coach outlet
kate spade bags
coach outlet
nike air force
chaussure louboutin
nike air max
tory burch handbags
air max shoes
air jordan
nike blazer
nike blazer low
jordan homme
michael kors
abercrombie
gucci

oakleyses said...

oakley sunglasses, longchamp outlet, ugg boots, chanel handbags, nike air max, longchamp, christian louboutin outlet, michael kors outlet, oakley sunglasses, tiffany and co, replica watches, tory burch outlet, nike air max, ray ban sunglasses, michael kors outlet, louboutin shoes, jordan shoes, louis vuitton outlet, louis vuitton, ray ban sunglasses, longchamp outlet, polo ralph lauren outlet, replica watches, kate spade outlet, oakley sunglasses, polo ralph lauren outlet, cheap oakley sunglasses, ugg boots, nike free, tiffany jewelry, michael kors outlet, uggs on sale, louis vuitton outlet, michael kors, oakley sunglasses, louboutin, louis vuitton, michael kors outlet, ray ban sunglasses, prada handbags, louis vuitton, burberry, burberry outlet online, gucci outlet

oakleyses said...

nike blazer, michael kors, nike free run uk, nike air max, true religion jeans, true religion jeans, air jordan pas cher, nike air max, ralph lauren uk, timberland, air max, nike roshe, tn pas cher, louboutin pas cher, true religion outlet, vans pas cher, coach outlet, hermes, ralph lauren pas cher, nike free, coach purses, michael kors, oakley pas cher, mulberry, hollister pas cher, lacoste pas cher, new balance pas cher, ray ban pas cher, vanessa bruno, burberry, hollister, michael kors, kate spade handbags, coach outlet, abercrombie and fitch, lululemon, coach factory outlet, nike roshe run, north face, nike air max, ray ban uk, michael kors, true religion jeans, converse pas cher, north face, air force, hogan, sac longchamp, longchamp pas cher, sac guess

oakleyses said...

ferragamo shoes, iphone 6s plus cases, babyliss, longchamp, reebok shoes, nike trainers, asics running shoes, oakley, iphone 5s cases, celine handbags, hollister, nfl jerseys, jimmy choo shoes, birkin bag, iphone 6s cases, iphone cases, mcm handbags, bottega veneta, giuseppe zanotti, iphone 6 plus cases, abercrombie and fitch, p90x workout, beats by dre, herve leger, north face outlet, instyler, louboutin, soccer jerseys, lululemon, nike roshe, s5 cases, timberland boots, mac cosmetics, soccer shoes, valentino shoes, insanity workout, vans shoes, hollister, ralph lauren, wedding dresses, ipad cases, chi flat iron, north face outlet, iphone 6 cases, nike air max, ghd, mont blanc, baseball bats, new balance, nike huarache

oakleyses said...

ugg pas cher, vans, moncler, moncler, canada goose, louis vuitton, ugg boots uk, canada goose, toms shoes, doudoune canada goose, moncler, louis vuitton, louis vuitton, ugg australia, juicy couture outlet, moncler, supra shoes, doke gabbana outlet, gucci, karen millen, moncler outlet, hollister, moncler, hollister, canada goose, louis vuitton, ray ban, marc jacobs, pandora jewelry, michael kors outlet online, moncler, swarovski crystal, pandora jewelry, wedding dresses, thomas sabo, moncler, bottes ugg, sac louis vuitton pas cher, nike air max, barbour, barbour jackets, pandora charms, canada goose outlet, canada goose uk, michael kors outlet, converse outlet, links of london, canada goose outlet, pandora charms, canada goose

mmjiaxin said...

air max 90
prada outlet
chanel outlet store
louis vuitton handbags
kobe shoes
rolex watches
hollister uk
fitflops outlet sale
north face outlet
nhl jerseys
moncler outlet
canada goose outelt
coach outlet store
ghd uk
mulberry outlet store
air jordan shoes for sale
toms outlet
longchamp handbags
michael kors outlet
hermes outlet store
mm1205

方松腾 said...

michael kors handbags,michael kors outlet,michael kors,kors outlet,michael kors outlet online,michael kors outlet online sale,michael kors handbags clearance,michael kors purses,michaelkors.com,michael kors bags,michael kors shoes,michaelkors,cheap michael kors
mlb jerseys wholesale
cheap mlb jerseys
cheap nfl jerseys
nfl jerseys wholesale
nike shoes
cheap oakley sunglasses
snapback hats
soccer jerseys,cheap soccer jerseys,cheap soccer jerseys for sale,soccer jersey,usa soccer jersey,football jerseys
cheap uggs
cheap ugg boots
ugg boots
uggs outlet
wedding dresses
chicago blackhawks

chenmeinv0 said...

mlb jerseys cheap
rolex watches
ugg outlet
canada goose jackets
air max uk
louboutin shoes
oakley sunglasses wholesale
moncler uk
ugg boots outlet
kate spade
hzx20170206

Meiqing Xu said...

coach outlet online
cardinals jerseys
yeezy boost 350
coach outlet store online
ray ban sunglasses outlet
hermes outlet online
coach factory outlet online
eahawks jerseys
michael kors purse
coach outlet store online
20170310huazhen

shengda xu said...

louboutin pas cher
polo ralph lauren outlet
ralph lauren outlet
michael kors outlet clearance
longchamp outlet store
birkenstocks
yeezy boost 350 v2
kate spade handbags
valentino
nike roshe
xsuhengda0609