@shellex说: 对对,他们上辈子都是折翼的新奥尔良鸡翅

Pages

Topics

随便看看

路边社评论员

  • Keith:
    还能用不. »
  • deepblue:
    测试一下浏览器和系统 »
  • abettor:
    “就和CPU特权级别一样”——这的哥难道是Linus的表弟?! »
  • 董英男:
    为什么总提示确认是相册首页呢 到底哪个才是相册首页啊 »
  • kendisk:
    作为一个轻度Linuxer,刚分手后,感觉木有鸭梨。 »
  • MS IE:
    THIS SITE REALLY SUCK! »
  • Alex:
    gnome-women... »
  • liangsuilong:
    GNOME 自己也有鼓励女性参与项目的计划啊.. »
  • infinte:
    对不起,你的“解ban”版本算得有点问题,可以下(9)pp4 测试。ACID3可有95分啊……另外同... »
  • Alex:
    »
  • Randee Saadat:
    Glad you solved your problem, but what is your que... »
  • LinuxRock:
    没想到你也有一台和我一样的破机子......还好现在高三没怎么用,受不了它的发热量.. »

测试Wordpress对代码的擅作主张程度.

昨天花花问我为什么Wordpress老是擅自替换代码中的符号,我也不大清楚呢,只知道它有时会把我的”>”转义。(我用的是WP-Syntax插件)

现在我来试试,使用WP-Syntax风格的pre标签:

Python:

#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys

def print_a_string(rgb):
    print "fuck shit come on baby"

if __name__ == "__main__":
    a = {'fuck': ["shit", "come on", "baby"]}
    print_a_string()

C++

// Hey, I hate lover
#include 
#include "Person.h"
using namespace std;

void fuck(Person &somebody) {
    cout<<"fucking "<< somebody.name->raw_str() <<"... DONE!"<

PHP:

$link=mysql_connect('localhost','root','fuck');
if(!$link) {
    echo "失败!";
    exit;
}
$db=mysql_select_db("person",$link);
$who=$_REQUEST['who'];
$action=$_REQUEST['action'];
echo "对象:".$who.'
';
echo "动作:".$action.'
';
$query="select `name` from `access` where name='$who'";
$result=mysql_query($query);
if($result)
{
    $row=mysql_fetch_array($result);
    $you=$row[0];
    mysql_close($link);
    if ($action == ''fuck'') {
        echo "fuck $you ... DONE!");
        exit;
    } else {
        echo("I am tired...");
        exit;
    }
}

HTML:

I love you.

purely, mental and body.

结果看上去还不错哈...以前>被转义的问题也不存在咯貌似。
(前提是一直使用HTML模式编辑,不要切换到Visual模式去)。

但是如果貌似对于HTML只允许存在BODY以内的标签,什么HTML啦,TITLE啦,HEAD啦,都不灵。

  1. On December 16, 2008 at 11:52 am
    华华: Mozilla Firefox 3.0.4 / Ubuntu Linux

    赞 WP-Syntax ~

  2. On December 16, 2008 at 4:26 pm
    TualatriX: Mozilla Firefox 3.0.4 / Gentoo Linux

    箭头被转义了……C++代码乱了。哈哈。

  3. On December 16, 2008 at 5:07 pm
    dustman: Internet Explorer 6.0 / Windows XP

    分享个笑话:

    男人就像一元硬币;一面是一;一面是菊花;

  4. On December 16, 2008 at 5:08 pm
    dustman: Internet Explorer 6.0 / Windows XP

    cout<<”fucking “<< somebody.name->raw_str() <<”… DONE!”<

    这个是什么意思 我看不懂

  5. On December 16, 2008 at 5:09 pm
    dustman: Internet Explorer 6.0 / Windows XP

    哦 你文章里 << 显示有问题

  6. On December 16, 2008 at 7:51 pm
    shellex: Mozilla Firefox 3.0.4 / Linux

    @华华,
    虽然有些瑕疵,但是还是不错的。

  7. On December 16, 2008 at 7:52 pm
    shellex: Mozilla Firefox 3.0.4 / Linux

    @TualatriX,
    最后一次编辑时不小心切换到Visual模式了。所以就乱了。保持使用HTML模式编辑就木问题了。

  8. On December 16, 2008 at 7:52 pm
    shellex: Mozilla Firefox 3.0.4 / Linux

    @dustman,
    你越来越邪恶了。

  9. On December 21, 2008 at 2:09 pm
    lpj: Mozilla Firefox 3.0b5 / Linux

    博主,我现在使用WP-syntax的时候左尖括号<和右尖括号都会被替换掉,你这里显示正常,怎么实现的,把WP升到2.7就可以了吗?

  10. On December 21, 2008 at 3:05 pm
    shellex: Mozilla Firefox 3.0.5 / Linux

    @lpj,
    我记得是保持使用HTML模式编辑就木问题了。

  11. On December 21, 2008 at 4:03 pm
    lpj: Mozilla Firefox 3.0b5 / Linux

    @shellex,
    我是在blog.ubuntu.org.cn上申请的博客,现在情况下:“一直在HTML下编辑,结果显示出来时尖括号都被替换了。”,现在WP的版本好像是2.62,我在想是不是你把WP升级到2.7的原因呢,谢谢博主

  12. On December 21, 2008 at 5:45 pm
    shellex: Mozilla Firefox 3.0.5 / Linux

    @lpj,
    我也不大清楚呢…难道真的是wp版本问题?你问问一叶什么时候把blog升级一下。

Leave a Reply