数据库值中的单引号会中断导入

时间:2012-02-28 11:16:48

标签: mysql regex notepad++

您好,很抱歉我见过很多这样的问题,但没有直接回答,

首先让我说这是一个WordPress问题,当保存在数据库中时,延迟不会转义单引号,所以我现在遇到的问题是我有一个导出的数据库我必须恢复但是不能

这是我的问题的一个例子

INSERT INTO `demo` VALUES(1, 'wordpress\'s developers are stupid');

现在为什么WordPress没有在那里运行数据库插入虽然mysql_real_escape_string超出了我的范围,但是我使用notepad ++来修复问题所以我需要一种REGEX方式来保持字符串和替换'标记出字符串

所以我设法让一个人转换HTML标签:

   Find: =\\\'([^']*)\\\'
   Replace: =\"\1\"

所以我需要找到'(引用打开)\'(随机引用)',(引用关闭,在查询中的下一个值之后)或');(引用在查询结束时关闭)

所以我需要将随机引用更改为'

对于我的档案,我收到了这个确切的错误

SQL query:

INSERT INTO `wp_options` VALUES (787,0,'_transient_feed_9d5a2d683089079967601880d493887f','a:4:{s:5:\"child\";a:1:{s:0:\"\";a:1:{s:3:\"rss\";a:1:{i:0;a:6:{s:4:\"data\";s:4:\"\n \n\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:7:\"version\";s:3:\"2.0\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:1:{s:7:\"channel\";a:1:{i:0;a:6:{s:4:\"data\";s:83:\"\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:4:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:48:\"link:http://www.agressousergroup.co.uk/ - Google Blog Search\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:85:\"http://www.google.com/search?ie=utf-8&q=link:http://www.agressousergroup.co.uk[...]

MySQL said: 

#1366 - Incorrect string value: '\x85 item...' for column 'option_value' at row 1  

真正烦人的是,当我搜索脚本即时使用" x85项目"没有结果(我使用记事本++)

确切查询:

INSERT INTO `wp_options` VALUES (787,0,'_transient_feed_9d5a2d683089079967601880d493887f','a:4:{s:5:\"child\";a:1:{s:0:\"\";a:1:{s:3:\"rss\";a:1:{i:0;a:6:{s:4:\"data\";s:4:\"\n  \n\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:7:\"version\";s:3:\"2.0\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:1:{s:7:\"channel\";a:1:{i:0;a:6:{s:4:\"data\";s:83:\"\n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n  \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:4:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:48:\"link:http://www.agressousergroup.co.uk/ - Google Blog Search\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:85:\"http://www.google.com/search?ie=utf-8&q=link:http://www.agressousergroup.co.uk/&tbm=blg&tbs=sbd:1\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:88:\"Results <b>1</b> - <b>10</b> of about <b>117</b> for <b>link:http://www.agressousergroup.co.uk/</b>.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"item\";a:10:{i:0;a:6:{s:4:\"data\";s:47:\"\n      \n      \n      \n      \n      \n      \n    \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:3:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:67:\"SCOM 2007 R2 Event Log Alerting and Monitoring for Azure <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:125:\"http://blogs.msdn.com/b/walterm/archive/2011/08/19/scom-2007-r2-event-log-alerting-and-monitoring-for-azure-applications.aspx\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:543:\"For this first part of setting up rules, I am essentially following guidance which can be found on TechNet at <em>http</em>://technet.microsoft.com/en-us/library/gg508734.aspx. To begin, we will launch <b>...</b> this series of documents. From the Actions pane on the far right, select the New <em>link</em>, and then from the popup menu, select the Custom Rule… item. <b>....</b> Below is my successful telnet session that was launched from the command line with the command telnet <em>localhost</em> 25. You can use anything for <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:3:{s:9:\"publisher\";a:1:{i:0;a:5:{s:4:\"data\";s:53:\"Thoughts on ALM, Azure, and Agile by Walter Myers III\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Walter Myers III\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"date\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"Fri, 19 Aug 2011 01:02:14 GMT\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:1;a:6:{s:4:\"data\";s:47:\"\n      \n      \n      \n      \n      \n      \n    \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:3:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:73:\"HowTo install the Brother DCP-<b>7065DN</b> in a Linux network <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:91:\"http://bleedux.wordpress.com/2011/08/01/brother-dcp-7065dn-receiving-data-but-not-printing/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:320:\"Result: none available for the DCP-<em>7065DN</em>. <b>...</b> emacs PathToTemporaryDir/usr/local/Brother/Printer/<em>DCP7065DN</em>/cupswrapper/<em>cupswrapperDCP7065DN</em>-2.0.4 <b>...</b> If you now return to <em>http</em>://<em>localhost</em>:631/ <b>...</b> <em>Link</em> the files in the following way: <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:3:{s:9:\"publisher\";a:1:{i:0;a:5:{s:4:\"data\";s:17:\"The Bleeding Edge\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:12:\"M. Marschall\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"date\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"Mon, 01 Aug 2011 00:33:11 GMT\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:2;a:6:{s:4:\"data\";s:47:\"\n      \n      \n      \n      \n      \n      \n    \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:3:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:74:\"Outlook Web Access Web Administration Tool - The page cannot be <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:112:\"http://community.spiceworks.com/topic/141270-outlook-web-access-web-administration-tool-the-page-cannot-be-found\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:551:\"I downloaded the Outlook Web Access Web Administration Tool from: <em>http</em>://www.microsoft.com/downloads/en/details.aspx? <b>...</b> FamilyID=<em>4bbe7065</em>-a04e-43ca-8220-859212411e10&amp;displaylang=en <b>...</b> server itself, it has been a while since had a 2003 server, but I recall similiar issues. I don&#39;t have a fix, but I do remember always RDP&#39;ing into the server and accessing the Web admin tool locally. Here is a helpful <em>link</em>. <em>http</em>://technet.microsoft.com/en-us/library/bb508837(EXCHG.65).aspx <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:3:{s:9:\"publisher\";a:1:{i:0;a:5:{s:4:\"data\";s:20:\"Spiceworks Community\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:7:\"Reg1145\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"date\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"Thu, 26 May 2011 14:45:38 GMT\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:3;a:6:{s:4:\"data\";s:47:\"\n      \n      \n      \n      \n      \n      \n    \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:3:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:70:\"Transmittal Letter No. 661 Volume I To: Heads of Government <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:46:\"http://www.fms.treas.gov/tfm/vol1/v1p4c210.pdf\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:520:\"<em>http</em>://www.paymentaccuracy. gov used to post specified improper payment information submitted by agencies, consist- ent with the requirements of. Executive Order 13520, § 2.(b). This official Web site also is used to collect from the public <b>...</b> changes, and <em>links</em> to additional resources and information otherwise available on the. Internet. The timelines for agencies to submit required improper payments information for posting on the PaymentAccuracy.gov. Web site are discussed in <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:3:{s:9:\"publisher\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"FMS Publications\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:7:\"unknown\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"date\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"Thu, 14 Apr 2011 19:34:56 GMT\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:4;a:6:{s:4:\"data\";s:47:\"\n      \n      \n      \n      \n      \n      \n    \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:3:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:21:\"????? - ????\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:41:\"http://toos-iran.blogfa.com/post-171.aspx\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:781:\"?????? ???? d-<em>link</em> 300t ???? adsl ??????? (---) 6295. <b>....</b> ??? <em>localhost</em> ????? 127.0.0.1 ????? 6421. <b>....</b> ??? ???? ???? ? ???? ?? ???? ???? ?????? (TP-<em>Link</em> TD-W8901G) 6541. <b>....</b> ??????? ???????? ??? ????? ?? <em>http</em>://www.demonoid.com/ 6830. <b>....</b> <em>7065</em>. ?? chat ???? 7066. ?????? ???? ???? ADSL 7067. ???? ???? ?? ??????? wireless ???? 7068. ????? ????? ?? ??? ????? ??? ???? ???? 7069. ????? ??????? ???? ????? ?? ??? 2003 7070. ???? ???? ??????? 7071. ???? ** ?????? 7072. ?????? <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:3:{s:9:\"publisher\";a:1:{i:0;a:5:{s:4:\"data\";s:10:\"?????\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:9:\"toos-iran\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"date\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"Wed, 23 Mar 2011 07:00:00 GMT\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:5;a:6:{s:4:\"data\";s:47:\"\n      \n      \n      \n      \n      \n      \n    \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:3:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:52:\"Learning Ruby: Expert Advice for Advanced Developers\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:50:\"http://mashable.com/2011/02/02/advanced-ruby-code/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:324:\"<em>http</em>://<em>localhost</em>:9292/to_a -&gt; 123. # <em>http</em>://<em>localhost</em>:9292/pop -&gt; 3. # <em>http</em>://<em>localhost</em>:9292/shift -&gt; 1. # Implementations in other languages (thanks guys!): # Node.js: <em>https</em>://gist.github.com/700995. # Groovy: https://gist.github.com/702337 <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:3:{s:9:\"publisher\";a:1:{i:0;a:5:{s:4:\"data\";s:9:\"Mashable!\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:12:\"Jolie O\'Dell\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"date\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"Wed, 02 Feb 2011 13:40:03 GMT\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:6;a:6:{s:4:\"data\";s:47:\"\n      \n      \n      \n      \n      \n      \n    \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:3:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:69:\"Sending Email Alert for Application Current State « Middleware Magic\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:43:\"http://middlewaremagic.com/weblogic/?p=7042\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:535:\"If you see an Empty Classpath even after running the “setWLSEnv.sh” then please refer to the Note mentioned at Step3) in the Following post: <em>http</em>://middlewaremagic.com/weblogic/?page_id=1492 Step-5) Now run the WLST Script in the same <b>...</b> total.number.of.servers=3. server.name.1=AdminServer server.url.1=t3://<em>localhost</em>:7001. server.name.2=MS-1 server.url.2=t3://<em>localhost</em>:5001. server.name.3=MS-2 server.url.3=t3://<em>localhost</em>:6001. # Check Server State At following interval in <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:3:{s:9:\"publisher\";a:1:{i:0;a:5:{s:4:\"data\";s:16:\"Middleware Magic\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:11:\"Ravish Mody\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"date\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"Thu, 07 Jul 2011 12:38:30 GMT\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:7;a:6:{s:4:\"data\";s:47:\"\n      \n      \n      \n      \n      \n      \n    \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:3:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:54:\"Server Kurulumu : Hatalar , Sorunlar , Bilmedikleriniz\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:89:\"http://pvp-serverler.forumclan.com/t2019-server-kurulumu-hatalar-sorunlar-bilmedikleriniz\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:644:\"Host:HamachiIp.100// <em>Localhost</em> // 192.168.2.100. Port:3306[Mysql Port] ID:Root PW:123456[Degistirmediyseniz] <b>....</b> pc . give_item2 ( &quot;<em>7065</em>&quot; , 1 ) pc . give_item2 ( &quot;11835&quot; , 1 ) pc . give_item2 ( &quot;12645&quot; , 1 ) pc . give_item2 ( &quot;13025&quot; , 1 ) pc . give_item2 ( &quot;14105&quot; , 1 ) pc . give_item2 ( &quot;15089&quot; , 1 ) pc . give_item2 ( &quot;16105&quot; , 1 ) pc . give_item2 ( &quot;17105&quot; , 1 ) say_reward ( &quot;Du erhielst Super Eline Saglk . Schamiset!&quot; ) end <b>...</b> Kullanici profilini gör <em>http</em>://pvp-serverler.forumclan.com <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:3:{s:9:\"publisher\";a:1:{i:0;a:5:{s:4:\"data\";s:71:\"Metin2 PVP Serverler l Private Serverler l Knight Private Serverler l :\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:10:\"MrLeqandry\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"date\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"Thu, 06 Jan 2011 15:59:17 GMT\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:8;a:6:{s:4:\"data\";s:47:\"\n      \n      \n      \n      \n      \n      \n    \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:3:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:51:\"CARA SPYWARE MENGINFEKSI KOMPUTER « Lombok_Creck84\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:74:\"http://creck84.wordpress.com/2010/12/28/cara-spyware-menginfeksi-komputer/\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:522:\"Seorang penyerang remote bisa membuat <em>link</em> URL dibuat menggunakan Objek Data Tag akan dieksekusi di web browser&#39;s korban dalam konteks keamanan dari situs hosting, setelah <em>link</em> diklik. Para penyerang memanfaatkan <b>...</b> <em>HTTP</em> / 1.1 200 OK Tanggal: Mon, 18 April 2005 12: 27: 30 GMTServer: Apache / 1.3.33 (Unix) mod_deflate / 1.0.21 Koneksi: tutup Transfer - Encoding: chunked Content - Type: application / HTA script &lt; bahasa =&gt; JScript try { . Diri moveTo (5000, 5000); <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:3:{s:9:\"publisher\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Lombok_Creck84\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:14:\"Lombok_Creck84\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"date\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"Tue, 28 Dec 2010 04:51:11 GMT\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}i:9;a:6:{s:4:\"data\";s:47:\"\n      \n      \n      \n      \n      \n      \n    \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:3:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:42:\"???????? ? telnet - ZABBIX Forums\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:50:\"http://www.zabbix.com/forum/showthread.php?t=20387\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:553:\"<em>http</em>://www.zabbix.com/documentation/...l/config/items <b>...</b> [root@<em>localhost</em> ~]# /usr/sbin/tcpdump -i eth0 -s 0 -X &quot;host 192.168.1.52 and tcp port 10010&quot; tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, <em>link</em> -type EN10MB (Ethernet), capture size 65535 bytes <b>...</b> command&gt;&quot;.fo 0x00a0: 7220 696e 666f 726d 6174 696f 6e20 6f6e r.information.on 0x00b0: 2061 2073 <em>7065</em> 6369 6669 6320 636f 6d6d .a.specific.comm 0x00c0: 616e 642e 0a0d and. <b>...</b>\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:32:\"http://purl.org/dc/elements/1.1/\";a:3:{s:9:\"publisher\";a:1:{i:0;a:5:{s:4:\"data\";s:13:\"ZABBIX Forums\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:7:\"creator\";a:1:{i:0;a:5:{s:4:\"data\";s:5:\"angro\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"date\";a:1:{i:0;a:5:{s:4:\"data\";s:29:\"Mon, 27 Dec 2010 23:11:53 GMT\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}}}s:36:\"http://a9.com/-/spec/opensearch/1.1/\";a:3:{s:12:\"totalResults\";a:1:{i:0;a:5:{s:4:\"data\";s:3:\"117\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:10:\"startIndex\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"1\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:12:\"itemsPerPage\";a:1:{i:0;a:5:{s:4:\"data\";s:2:\"10\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}}}}}}}}s:4:\"type\";i:128;s:7:\"headers\";a:7:{s:12:\"content-type\";s:28:\"text/xml; charset=ISO-8859-1\";s:4:\"date\";s:29:\"Tue, 11 Oct 2011 09:59:27 GMT\";s:7:\"expires\";s:2:\"-1\";s:13:\"cache-control\";s:18:\"private, max-age=0\";s:10:\"set-cookie\";a:2:{i:0;s:143:\"PREF=ID=f20c4b1c78116086:FF=0:TM=1318327167:LM=1318327168:S=JmwTN04g_cBBkXlQ; expires=Thu, 10-Oct-2013 09:59:28 GMT; path=/; domain=.google.com\";i:1;s:212:\"NID=51=kumBg-YqiVjIylrlQZnAp1IHv6-PAK1TIMAXdUBv4d9njuL-S5g35y0ZJYHQQxUJrc3rG8i2vRNHvkb_Ydpag_xqTuIEihrf2G0LM2c6pTZ6imb8lozQWVJOKQoEV4gm; expires=Wed, 11-Apr-2012 09:59:28 GMT; path=/; domain=.google.com; HttpOnly\";}s:6:\"server\";s:3:\"gws\";s:16:\"x-xss-protection\";s:13:\"1; mode=block\";}s:5:\"build\";s:14:\"20090627192103\";}','no');

1 个答案:

答案 0 :(得分:1)

稍微偏离主题但是:

当然问题不在于数据库没有逃避引号。在数据库中使用未转义的内容是完全有效的,因为否则您将数据库中数据的使用耦合到特定的表示层(HTML)......

表示层负责确保所有内容都安全显示。如果要将数据重新导入到同一个应用程序并且它仍然输出转义,那么如果将引用'更改为&#39;,程序中的逻辑是否会将输出转义为:

wordpress&amp;#39;s developers are stupid

上面的INSERT语句已经被转义(毕竟,反斜杠转义引号字符)并且根据reference manualwordpress\'s是将wordpress's放到{{1}的结果}}

所以,如果你真的想要更改引号,因为它们已经被转义,你可以直接替换mysql_real_escape_string()\',但我怀疑你可能遇到其他问题

编辑(基于更新的帖子):

我相信你可能遇到过字符编码问题。根据您的输入行,我认为问题源于:

&quot;

字符集中可能无法识别select the Custom Rule… item 字符(当我将输入粘贴到我的编辑器中时,它变为黑盒子。请检查您的文件编码是否正确,是UTF-8(或者MySQL所期望的任何东西,并且没有在文件传输或其他东西中被破坏。