• R/O
  • HTTP
  • SSH
  • HTTPS

feedblog_ext: Commit

JavaScriptのみで記述されたブログツール・ソフトウェアです。表示にExt JSを使用します


Commit MetaInfo

Revision72df5befa2fe873bb0500720f68e415edef38c11 (tree)
Time2009-06-06 13:24:43
Authorelixirel <elixirel@user...>
Commiterelixirel

Log Message

fixed paragraph bug with "ONLY" IE!

Change Summary

Incremental Difference

--- a/js/lunardial/feedblog_gen.js
+++ b/js/lunardial/feedblog_gen.js
@@ -4,7 +4,7 @@
44 * @copyright 2009 FeedBlog Project (http://sourceforge.jp/projects/feedblog/)
55 * @author Kureha Hisame (http://lunardial.sakura.ne.jp/) & Yui Naruse (http://airemix.com/)
66 * @since 2009/06/03
7- * @version 0.1.0.0
7+ * @version 0.5.0.0
88 */
99 // Feex XMLの<content>要素で、<br>を使用しているか?
1010 var inputValidateMode = 1;
@@ -40,7 +40,7 @@ function applyChange(){
4040 entry.published = dateRfc3339;
4141 entry.updated = dateRfc3339;
4242 entry.link = pageAddr + "#" + entry.id;
43- entry.content = document.getElementById("entry_stdin").value;
43+ entry.content = document.getElementById("entry_stdin").value.replace(/\r\n/g, "\n");
4444 entryList.unshift(entry);
4545
4646 refleshEntrylistBox();
@@ -48,7 +48,7 @@ function applyChange(){
4848 else {
4949 entryList[editIndex].title = document.getElementById("entry_title").value;
5050 entryList[editIndex].updated = getDate();
51- entryList[editIndex].content = document.getElementById("entry_stdin").value;
51+ entryList[editIndex].content = document.getElementById("entry_stdin").value.replace(/\r\n/g, "\n");
5252 }
5353
5454 document.getElementById("stdout").value = toXml(feedInfo, entryList);
@@ -202,10 +202,8 @@ function entryLoader(index){
202202 editIndex = -1;
203203 }
204204 else {
205- var temp_content = entryList[index].content;
206- alert(temp_content);
207205 document.getElementById("entry_title").value = entryList[index].title;
208- document.getElementById("entry_stdin").value = temp_content;
206+ document.getElementById("entry_stdin").value = entryList[index].content;
209207 editIndex = index;
210208 }
211209 }
@@ -336,11 +334,10 @@ function xmlAttrContentEscape(str){
336334
337335 /**
338336 * XMLの逆エスケープを行う関数
339- * バグあり!&amp;の処理がおかしい
340337 * @param {String} str 逆エスケープを行う文字列
341338 */
342339 function xmlAttrContentUnescape(str){
343- return str.replace(/&nbsp;/g, " ").replace(/&quot;/g, '"').replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&amp;/g, "&");
340+ return str.replace.replace(/&quot;/g, '"').replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&amp;/g, "&");
344341 }
345342
346343 /**
Show on old repository browser