adjusted parser to handle < and > to address issue #18 and even added a
little love <3
This commit is contained in:
parent
8144904d1e
commit
a9ac1c4bb8
4 changed files with 20 additions and 18 deletions
|
@ -1,12 +1,10 @@
|
|||
1
|
||||
47
|
||||
AboutPage.qml
|
||||
AppCover.qml
|
||||
LoginSheet.qml
|
||||
main.qml
|
||||
moment.js
|
||||
NewPostSheet.qml
|
||||
PostItem.qml
|
||||
ProfilePage.qml
|
||||
RefreshItem.qml
|
||||
SettingsPage.qml
|
||||
|
@ -44,6 +42,8 @@ icons/retweet.png
|
|||
icons/sign-out.png
|
||||
icons/star-o.png
|
||||
icons/star.png
|
||||
PostItem.qml
|
||||
StreamTab.qml
|
||||
WebViewSheet.qml
|
||||
parser.js
|
||||
AboutPage.qml
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
import bb.cascades 1.4
|
||||
import org.labsquare 1.0
|
||||
import "parser.js" as Parser
|
||||
|
||||
Page {
|
||||
|
||||
|
@ -109,7 +110,7 @@ Page {
|
|||
preferredWidth: ui.du(45)
|
||||
Label {
|
||||
//text: lorem
|
||||
text: user.content.html
|
||||
text: Parser.parsePostData(user.content.html)
|
||||
multiline: true
|
||||
textFormat: TextFormat.Html
|
||||
}
|
||||
|
|
|
@ -236,8 +236,9 @@ function parsePostData(t) {
|
|||
t = t.replace(/þ/g,"\u00FE");
|
||||
t = t.replace(/ÿ/g,"\u00FF");
|
||||
t = t.replace(/"/g,"\u0022");
|
||||
t = t.replace(/</g,"\u003C");
|
||||
t = t.replace(/>/g,"\u003E");
|
||||
t = t.replace(/<3/g, "\u2764");
|
||||
t = t.replace(/</g,"\u02C2");
|
||||
t = t.replace(/>/g,"\u02C3");
|
||||
t = t.replace(/€/g,"\u0080");
|
||||
t = t.replace(/‚/g,"\u0082");
|
||||
t = t.replace(/ƒ/g,"\u0083");
|
||||
|
|
|
@ -78,55 +78,55 @@
|
|||
<context>
|
||||
<name>ProfilePage</name>
|
||||
<message>
|
||||
<location filename="../assets/ProfilePage.qml" line="127"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="200"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="128"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="201"/>
|
||||
<source>Following</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/ProfilePage.qml" line="140"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="215"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="141"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="216"/>
|
||||
<source>Followers</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/ProfilePage.qml" line="153"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="187"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="154"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="188"/>
|
||||
<source>Posts</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/ProfilePage.qml" line="166"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="167"/>
|
||||
<source>Bookmarks</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/ProfilePage.qml" line="232"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="233"/>
|
||||
<source>Unfollow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/ProfilePage.qml" line="232"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="233"/>
|
||||
<source>Follow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/ProfilePage.qml" line="245"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="246"/>
|
||||
<source>Unmute</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/ProfilePage.qml" line="245"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="246"/>
|
||||
<source>Mute</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/ProfilePage.qml" line="258"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="259"/>
|
||||
<source>Unblock</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/ProfilePage.qml" line="258"/>
|
||||
<location filename="../assets/ProfilePage.qml" line="259"/>
|
||||
<source>Block</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
Reference in a new issue