JavaScriptのみで記述されたブログツール・ソフトウェアです。表示にExt JSを使用します
Revision | 72df5befa2fe873bb0500720f68e415edef38c11 (tree) |
---|---|
Time | 2009-06-06 13:24:43 |
Author | elixirel <elixirel@user...> |
Commiter | elixirel |
fixed paragraph bug with "ONLY" IE!
@@ -4,7 +4,7 @@ | ||
4 | 4 | * @copyright 2009 FeedBlog Project (http://sourceforge.jp/projects/feedblog/) |
5 | 5 | * @author Kureha Hisame (http://lunardial.sakura.ne.jp/) & Yui Naruse (http://airemix.com/) |
6 | 6 | * @since 2009/06/03 |
7 | - * @version 0.1.0.0 | |
7 | + * @version 0.5.0.0 | |
8 | 8 | */ |
9 | 9 | // Feex XMLの<content>要素で、<br>を使用しているか? |
10 | 10 | var inputValidateMode = 1; |
@@ -40,7 +40,7 @@ function applyChange(){ | ||
40 | 40 | entry.published = dateRfc3339; |
41 | 41 | entry.updated = dateRfc3339; |
42 | 42 | 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"); | |
44 | 44 | entryList.unshift(entry); |
45 | 45 | |
46 | 46 | refleshEntrylistBox(); |
@@ -48,7 +48,7 @@ function applyChange(){ | ||
48 | 48 | else { |
49 | 49 | entryList[editIndex].title = document.getElementById("entry_title").value; |
50 | 50 | 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"); | |
52 | 52 | } |
53 | 53 | |
54 | 54 | document.getElementById("stdout").value = toXml(feedInfo, entryList); |
@@ -202,10 +202,8 @@ function entryLoader(index){ | ||
202 | 202 | editIndex = -1; |
203 | 203 | } |
204 | 204 | else { |
205 | - var temp_content = entryList[index].content; | |
206 | - alert(temp_content); | |
207 | 205 | 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; | |
209 | 207 | editIndex = index; |
210 | 208 | } |
211 | 209 | } |
@@ -336,11 +334,10 @@ function xmlAttrContentEscape(str){ | ||
336 | 334 | |
337 | 335 | /** |
338 | 336 | * XMLの逆エスケープを行う関数 |
339 | - * バグあり!&の処理がおかしい | |
340 | 337 | * @param {String} str 逆エスケープを行う文字列 |
341 | 338 | */ |
342 | 339 | function xmlAttrContentUnescape(str){ |
343 | - return str.replace(/ /g, " ").replace(/"/g, '"').replace(/>/g, ">").replace(/</g, "<").replace(/&/g, "&"); | |
340 | + return str.replace.replace(/"/g, '"').replace(/>/g, ">").replace(/</g, "<").replace(/&/g, "&"); | |
344 | 341 | } |
345 | 342 | |
346 | 343 | /** |