Download
Magazine
Develop
Account
Download
Magazine
Develop
Login
Forgot Account/Password
Create Account
Language
Help
Language
Help
×
Login
Login Name
Password
×
Forgot Account/Password
Category:
Software
People
PersonalForge
Magazine
Wiki
Search
OSDN
>
Find Software
>
Internet
>
WWW/HTTP
>
Browsers
>
SIE
>
Ticket List/Search
>
Ticket #12884
Fork
Description
Project Summary
Developer Dashboard
Web Page
Developers
Image Gallery
List of RSS Feeds
Activity
Statistics
History
Downloads
List of Releases
Stats
Source Code
Code Repository list
Git
sie
Ticket
Ticket List
Milestone List
Type List
Component List
List of frequently used tickets/RSS
Submit New Ticket
Documents
FrontPage
Title index
Recent changes
Communication
Forums
List of Forums
公開討議 (9)
Mailing Lists
list of ML
sie-announce
sie-developers
News
Ticket #12884
Ticket List
Submit New Ticket
RSS
lt; という文字列を含む SVG ファイルが表示できない
Open Date:
2008-06-28 20:43
Last Update:
2008-09-19 23:57
monitor
ON
OFF
Reporter:
revulo
Owner:
dhrname
Type:
バグ報告
Status:
Closed
Component:
(None)
MileStone:
(None)
Priority:
7
Severity:
5 - Medium
Resolution:
Fixed
File:
1
Details
Reply
Inkscape の配布パッケージに含まれている
blend_modes.svg が、sie.php 経由だと表示できません。
sie.js の先頭にある以下のコードが原因です。
if (ait.match(/lt;/)) {
ait = ait.replace(/<.+?>/g,''); //ソース内のタグを
除去
};
//エンティティを文字に戻す
ait = ait.replace(/.lt;/g,'<').replace
(/.gt;/g,'>').replace(/.quot;/g,'"');
つまり sie.php を使わなくても、次のように lt; という文
字列がインラインで埋め込まれている時に、上記の変換が行
われるとおかしなことになります。
<script type="image/svg+xml">
<svg xmlns="http://www.w3.org/2000/svg">
... < ...
</svg>
</script>
誤動作を避けるために、
・置換は .lt; でなく < という文字列に対して行う
・この処理の部分を、if (sieb_s) {...} で囲むか、sie.js
の最後に移動させるか、ブックマークレット側に追い出す
のような対策を施した方が良いと思います。
Ticket History (3/9 Histories)
Show older Histories
2008-07-02 22:38
Updated by:
dhrname
Owner
Update from
(None)
to
dhrname
Resolution
Update from
None
to
Accepted
Comment
Reply
Logged In: YES
user_id=32883
了解です。返答が遅れて申し訳ありません。
対策を立ててみます。
2008-07-07 21:38
Updated by:
dhrname
Comment
Reply
Logged In: YES
user_id=32883
0.26では、この「置換は .lt; でなく < という文字列に対して
行う」という処置を行いました。
2008-07-20 20:38
Updated by:
dhrname
Resolution
Update from
Accepted
to
Fixed
2008-08-31 21:30
Updated by:
revulo
File
3329: sie_sieb.patch
is attached
Comment
Reply
Logged In: YES
user_id=33975
パッチを作ったので、添付しておきます。
その他の修正も含んでいるので、簡単な説明を書いておきます。
・var sieb_s; を追加。これでブックマークレット経由かどうかの
判定が楽にできる
・ブックマークレット経由、かつ < → < のように変換された
ソースの場合のみ、元に戻す処理を実行
・ソースを貼り付けた場合 & → & に変換されるはずなので、
その逆変換の処理を追加
・最後の try~catch は不要になるので削除
sieb_s という変数名は sieb という短い名前にしたいと思いまし
たが、それにはブックマークレット側の変更も必要になるので、そ
のままにしています。
2008-09-01 19:57
Updated by:
dhrname
Priority
Update from
5 - Medium
to
7
Resolution
Update from
Fixed
to
Accepted
Comment
Reply
Logged In: YES
user_id=32883
了解です。早速パッチを当ててみます。
2008-09-01 22:07
Updated by:
dhrname
Priority
Update from
7
to
8
Comment
Reply
Logged In: YES
user_id=32883
リビジョン459で適用しました。
2008-09-15 18:46
Updated by:
dhrname
Priority
Update from
8
to
7
Resolution
Update from
Accepted
to
Fixed
2008-09-19 23:57
Updated by:
revulo
Status
Update from
Open
to
Closed
Comment
Reply
Logged In: YES
user_id=33975
SIE 0.31 以降では直っているはずなので、状態を完了にして
おきます。
2008-09-19 23:57
Updated by:
revulo
Ticket Close date
is changed to
2008-09-19 23:57
Attachment File List (
1
)
Attachment File List
sie_sieb.patch
(1KB)
Edit
Add Comment
You are not logged in.
I you are not logged in, your comment will be treated as an anonymous post. »
Login
Add Comment
Preview
Submit
blend_modes.svg が、sie.php 経由だと表示できません。
sie.js の先頭にある以下のコードが原因です。
if (ait.match(/lt;/)) {
ait = ait.replace(/<.+?>/g,''); //ソース内のタグを
除去
};
//エンティティを文字に戻す
ait = ait.replace(/.lt;/g,'<').replace
(/.gt;/g,'>').replace(/.quot;/g,'"');
つまり sie.php を使わなくても、次のように lt; という文
字列がインラインで埋め込まれている時に、上記の変換が行
われるとおかしなことになります。
<script type="image/svg+xml">
<svg xmlns="http://www.w3.org/2000/svg">
... < ...
</svg>
</script>
誤動作を避けるために、
・置換は .lt; でなく < という文字列に対して行う
・この処理の部分を、if (sieb_s) {...} で囲むか、sie.js
の最後に移動させるか、ブックマークレット側に追い出す
のような対策を施した方が良いと思います。