{"id":357,"date":"2012-08-17T22:37:44","date_gmt":"2012-08-17T13:37:44","guid":{"rendered":"http:\/\/appsweets.net\/blog\/?p=357"},"modified":"2012-08-17T22:37:44","modified_gmt":"2012-08-17T13:37:44","slug":"review-rejected-3","status":"publish","type":"post","link":"http:\/\/appsweets.net\/blog\/2012\/08\/17\/review-rejected-3\/","title":{"rendered":"review rejected #3"},"content":{"rendered":"<div class=\"856f7bdf6ce2541193600c6e03dd1a56\" data-index=\"1\" style=\"float: left; margin: 16px 16px 16px 0;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5825700137064158\";\r\n\/* 250sq, appsweets-blog *\/\r\ngoogle_ad_slot = \"4837931762\";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>Firefox \u7248 wasavi \u306e\u30ec\u30d3\u30e5\u30fc\u304c\u306a\u3055\u308c\u305f\u3002\u3082\u3061\u308d\u3093 rejected\u3002<\/p>\n<p>\u307e\u305a innerHTML \u4f7f\u3046\u306a\u30dc\u30b1\uff01\u3000\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u308b\u3002wasavi.js \u3067\u306f\u5927\u307e\u304b\u306b\u5206\u3051\u3066 3 \u7b87\u6240\u3001innerHTML \u3092\u4f7f\u3063\u3066\u3044\u308b\u7b87\u6240\u304c\u3042\u308b\u3002\u3072\u3068\u3064\u3081\u306f\u3001wasavi \u672c\u4f53\u306e iframe \u5185\u3067\u3001<br \/>\n<code lang=\"javascript\"><br \/>\ndocument.body.innerHTML = wasaviFrame;<br \/>\n<\/code><br \/>\n\u3068\u3057\u3066 wasavi \u306e\u9aa8\u7d44\u307f\u3092\u7d44\u307f\u7acb\u3066\u3066\u3044\u308b\u3002\u3053\u3053\u3067 wasaviFrame \u306b\u306f\u3001body \u4ee5\u4e0b\u306e\u9aa8\u7d44\u307f\u5168\u4f53\u3068\u306a\u308b html \u306e\u6587\u5b57\u5217\u304c\u5165\u3063\u3066\u3044\u3066\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u304b\u3089\u9001\u3089\u308c\u3066\u304f\u308b\u3002\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u5074\u3067\u306f\u3053\u306e\u6587\u5b57\u5217\u306f\u3001\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u5185\u304b\u3089\u8aad\u307f\u51fa\u3059\u3002<\/p>\n<p>\u3053\u306e innerHTML \u306e\u64cd\u4f5c\u3092 DOM \u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u8981\u7d20\u305a\u3064\u7d44\u307f\u7acb\u3066\u308b\u51e6\u7406\u306b\u7f6e\u304d\u63db\u3048\u308b\u306e\u306f\u3001\u3061\u3087\u3063\u3068\u30b3\u30b9\u30c8\u304c\u9ad8\u3059\u304e\u308b\u3002\u307e\u305f\u3001\u524d\u8ff0\u306e\u901a\u308a\u5185\u5bb9\u304c\u5916\u90e8\u304b\u3089\u64cd\u4f5c\u3055\u308c\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3082\u306a\u3044\u3002\u3057\u305f\u304c\u3063\u3066\u3053\u306e\u7b87\u6240\u306b\u3064\u3044\u3066\u306f\u3001innerHTML \u306e\u4f7f\u7528\u306f\u554f\u984c\u306a\u3044\u306f\u305a\u3060\u3002\u305d\u3046\u3044\u3046\u3053\u3068\u3092\u8aac\u660e\u3059\u308b\u3053\u3068\u306b\u3057\u3088\u3046\u3002<\/p>\n<p>\u3075\u305f\u3064\u3081\u306f\u3001wasavi \u304c\u62e1\u5f35\u3059\u308b\u5bfe\u8c61\u3068\u306a\u308b textarea \u8981\u7d20\u306e value \u3092 wasavi \u3078\u8907\u88fd\u3059\u308b\u969b\u3002<br \/>\n<code lang=\"javascript\"><br \/>\nvar html =<br \/>\n  '<\/p>\n<div>' + textarea_value<br \/>\n  .replace(\/&\/g, '&amp;')<br \/>\n  .replace(\/<\/g, '&lt;')\n  .replace(\/>\/g, '&gt;')<br \/>\n  .replace(\/\\r\\n\/g, '\\n')<br \/>\n  .replace(\/\\u007f\/g, '\\u2421')<br \/>\n  .replace(\/[\\u0000-\\u0008\\u000b-\\u001f]\/g, function (a) {<br \/>\n    return String.fromCharCode(0x2400 + a.charCodeAt(0));<br \/>\n  })<br \/>\n  .replace(\/\\n\/g, '\\n<\/div>\n<div>') +<br \/>\n  '\\n<\/div>\n<p>';<br \/>\nthis.elm.innerHTML = html;<br \/>\n<\/code><br \/>\n\u3053\u3093\u306a\u611f\u3058\u3002\u3053\u3061\u3089\u306f\u3001textarea_value \u306b\u5165\u3063\u3066\u308b\u3082\u306e\u304c\u30da\u30fc\u30b8\u3068\u30e6\u30fc\u30b6\u6b21\u7b2c\u306e\u3082\u306e\u306a\u306e\u3067\u3001\u78ba\u304b\u306b innerHTML \u7d4c\u7531\u3060\u3068\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ea\u30b9\u30af\u304c\u751f\u307e\u308c\u308b\u4f59\u5730\u304c\u3042\u308b\uff08\u4e0a\u8a18\u306e\u4e8b\u524d\u306e\u30a8\u30b9\u30b1\u30fc\u30d7\u3092\u56de\u907f\u3059\u308b\u65b9\u6cd5\u306f\u3061\u3087\u3063\u3068\u3059\u3050\u306b\u306f\u601d\u3044\u3064\u304b\u306a\u3044\u304c\u2026\u2026\uff09\u3002\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u3053\u3061\u3089\u306f \\n \u3067\u5206\u5272\u3057\u305f textarea_value \u3092\u9010\u4e00\u751f\u6210\u3057\u305f div \u306e textContent \u306b\u7a81\u3063\u8fbc\u3080\u3088\u3046\u306a\u30eb\u30fc\u30d7\u306b\u5909\u66f4\u3057\u305f\u3002\u3053\u308c\u306f\u30c6\u30ad\u30b9\u30c8\u304c 1 \u4e07\u884c\u3068\u304b\u306b\u306a\u308b\u3068\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u554f\u984c\u304c\u51fa\u3066\u304f\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3001\u3055\u307e\u3056\u307e\u306a\u8981\u7d20\u306e\u5185\u5bb9\u3092\u751f\u6210\u3059\u308b\u969b\u306b<br \/>\n<code lang=\"javascript\"><br \/>\nelm.innerHTML = '';<br \/>\n<\/code><br \/>\n\u3068\u3084\u3063\u3066\u3044\u308b\u7b87\u6240\u304c\u3044\u304f\u3064\u304b\u3042\u308b\u3002\u3053\u308c\u306b\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ea\u30b9\u30af\u304c\u5165\u308a\u8fbc\u3080\u4f59\u5730\u306f\u306a\u3044\u3068\u601d\u3046\u304c\u3001DOM Range \u3092\u7528\u3044\u3066\u5185\u5bb9\u3092\u6d88\u53bb\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u3057\u305f\u3002<br \/>\n<code lang=\"javascript\"><br \/>\nfunction emptyNodeContents (node) {<br \/>\n  var r = document.createRange();<br \/>\n  r.selectNodeContents(node);<br \/>\n  r.deleteContents();<br \/>\n  r.detach();<br \/>\n}<br \/>\n<\/code><br \/>\ninnerHTML \u95a2\u9023\u306f\u4ee5\u4e0a\u3002<\/p>\n<p>\u6b21\u306b\u3001javascript \u5185\u3067\u4ed6\u306e javascript \u30bd\u30fc\u30b9\u3092\u8aad\u307f\u8fbc\u3080\u306e\u306b<br \/>\n<code lang=\"javascript\"><br \/>\ndocument.write('<script src=\"extension_wrapper.js\"><\/scrpt>');<br \/>\n<\/code><br \/>\n\u3068\u3084\u3063\u3066\u3044\u308b\u7b87\u6240\u3092\u6307\u6458\u3055\u308c\u305f\u3002script \u8981\u7d20\u306e\u751f\u6210\u306b\u3064\u3044\u3066\u3053\u306e\u624b\u306e\u66f8\u304d\u65b9\u306f\u5206\u304b\u308a\u306b\u304f\u3044\u304b\u3089\u30c0\u30e1\u3068\u3044\u3046\u3053\u3068\u306e\u3088\u3046\u3060\u3002\u3053\u308c\u306f\u5358\u306b document.createElement('script') \u3067\u751f\u6210\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067 innerHTML \u306b\u3064\u3044\u3066 1 \u4ef6\u3060\u3051\u4e0d\u5b89\u306a\u3068\u3053\u308d\u304c\u6b8b\u308b\u3002\u305d\u3082\u305d\u3082 iframe \u306e body \u8981\u7d20\u306e\u5185\u5bb9\u3092\u308f\u3056\u308f\u3056 javascript \u3067\u30bb\u30c3\u30c8\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u306e\u306f\u3001Opera \u3068 Firefox \u3067\u306f iframe \u306e src \u304c\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u5185\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u6307\u305b\u306a\u3044\u304b\u3089\u3060\u3002resource:\/\/[extension-id]\/data\/wasavi_frame.html \u3068\u304b\u3001widget:\/\/[extension-id]\/wasavi_frame.html \u306e\u3088\u3046\u306a\u3082\u306e\u3092\u6307\u5b9a\u3059\u308b\u3068\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30a8\u30e9\u30fc\u306b\u306a\u308a\u3001\u56de\u907f\u3067\u304d\u306a\u3044\uff08Chrome \u3067\u306f\u3001manifest \u3067\u901a\u5e38\u306e\u30da\u30fc\u30b8\u304b\u3089\u53c2\u7167\u53ef\u80fd\u306a\u30ea\u30bd\u30fc\u30b9\u3092\u660e\u793a\u7684\u306b\u5217\u6319\u3057\u3066\u5236\u9650\u3092\u56de\u907f\u3067\u304d\u308b\uff09\u3002Opera \u306b\u3064\u3044\u3066\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u306b\u5bfe\u3057\u3066 inject script \u3092\u5f15\u3063\u639b\u3051\u3066\u4e57\u3063\u53d6\u308b\u3068\u3044\u3046\u30c6\u30af\u30cb\u30c3\u30af\u304c\u4f7f\u3048\u308b\u304c\u3001\u306a\u304b\u306a\u304b\u306b\u30cf\u30c3\u30af\u306a\u306e\u3067\u3084\u3063\u3066\u3044\u306a\u3044\u3002<\/p>\n<p>\u7d50\u679c\u3001Opera \u3068 Firefox \u3067\u306f wasavi \u306e iframe \u304c\u6307\u3059 src \u306f http:\/\/wasavi.appsweets.net\/ \u3067\u3042\u308b\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001wasavi \u306e\u9aa8\u7d44\u307f\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u3063\u3066\u5fae\u5999\u306b\u7570\u306a\u308b\u306e\u3067\u3001\u4e0a\u8a18\u30a2\u30c9\u30ec\u30b9\u304c\u8fd4\u3059 html \u306b\u9aa8\u7d44\u307f\u3092\u542b\u3081\u3066\u3082\u4f7f\u3046\u308f\u3051\u306b\u306f\u3044\u304b\u306a\u3044\u3002\u3057\u305f\u304c\u3063\u3066\u4e0a\u8a18\u30a2\u30c9\u30ec\u30b9\u3092\u6307\u3059 iframe \u3092\u751f\u6210\u3057\u305f\u5f8c\u3001\u5185\u5bb9\u3060\u3051\u306f\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u5074\u3067\u518d\u751f\u6210\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u308f\u3051\u3060\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u305d\u3093\u306a\u611f\u3058\u3067\u518d\u63d0\u51fa\u3059\u308b\u3002<\/p>\n<div class=\"856f7bdf6ce2541193600c6e03dd1a56\" data-index=\"1\" style=\"float: left; margin: 16px 16px 16px 0;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5825700137064158\";\r\n\/* 250sq, appsweets-blog *\/\r\ngoogle_ad_slot = \"4837931762\";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Firefox \u7248 wasavi \u306e\u30ec\u30d3\u30e5\u30fc\u304c\u306a\u3055\u308c\u305f\u3002\u3082\u3061\u308d\u3093 rejected\u3002 \u307e\u305a innerHTML \u4f7f\u3046\u306a\u30dc\u30b1\uff01\u3000\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u308b\u3002wasavi.js \u3067\u306f\u5927\u307e\u304b\u306b\u5206\u3051\u3066 3 \u7b87\u6240\u3001innerHTML \u3092\u4f7f\u3063\u3066\u3044\u308b\u7b87\u6240\u304c\u3042\u308b\u3002\u3072\u3068\u3064\u3081\u306f\u3001wasavi \u672c\u4f53\u306e iframe \u5185\u3067\u3001 document.body.innerHTML = wasaviFrame; \u3068\u3057\u3066 wasavi \u306e\u9aa8\u7d44\u307f\u3092\u7d44\u307f\u7acb\u3066\u3066\u3044\u308b\u3002\u3053\u3053\u3067 wasaviFrame \u306b\u306f\u3001body \u4ee5\u4e0b\u306e\u9aa8\u7d44\u307f\u5168\u4f53\u3068\u306a\u308b html \u306e\u6587\u5b57\u5217\u304c\u5165\u3063\u3066\u3044\u3066\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u304b\u3089\u9001\u3089\u308c\u3066\u304f\u308b\u3002\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u5074\u3067\u306f\u3053\u306e\u6587\u5b57\u5217\u306f\u3001\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u5185\u304b\u3089\u8aad\u307f\u51fa\u3059\u3002 \u3053\u306e innerHTML \u306e\u64cd\u4f5c\u3092 DOM \u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u8981\u7d20\u305a\u3064\u7d44\u307f\u7acb\u3066\u308b\u51e6\u7406\u306b\u7f6e\u304d\u63db\u3048\u308b\u306e\u306f\u3001\u3061\u3087\u3063\u3068\u30b3\u30b9\u30c8\u304c\u9ad8\u3059\u304e\u308b\u3002\u307e\u305f\u3001\u524d\u8ff0\u306e\u901a\u308a\u5185\u5bb9\u304c\u5916\u90e8\u304b\u3089\u64cd\u4f5c\u3055\u308c\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3082\u306a\u3044\u3002\u3057\u305f\u304c\u3063\u3066\u3053\u306e\u7b87\u6240\u306b\u3064\u3044\u3066\u306f\u3001innerHTML \u306e\u4f7f\u7528\u306f\u554f\u984c\u306a\u3044\u306f\u305a\u3060\u3002\u305d\u3046\u3044\u3046\u3053\u3068\u3092\u8aac\u660e\u3059\u308b\u3053\u3068\u306b\u3057\u3088\u3046\u3002 \u3075\u305f\u3064\u3081\u306f\u3001wasavi \u304c\u62e1\u5f35\u3059\u308b\u5bfe\u8c61\u3068\u306a\u308b textarea \u8981\u7d20\u306e value \u3092 wasavi \u3078\u8907\u88fd\u3059\u308b\u969b\u3002 &hellip; <a href=\"http:\/\/appsweets.net\/blog\/2012\/08\/17\/review-rejected-3\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5,3,4],"class_list":["post-357","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-javascript","tag-vi","tag-wasavi"],"_links":{"self":[{"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/comments?post=357"}],"version-history":[{"count":6,"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/357\/revisions"}],"predecessor-version":[{"id":363,"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/357\/revisions\/363"}],"wp:attachment":[{"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/media?parent=357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/categories?post=357"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/tags?post=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}