diff --git a/src/Filtering/Filter.coffee b/src/Filtering/Filter.coffee index a81f419c8..cb4c4cb7a 100755 --- a/src/Filtering/Filter.coffee +++ b/src/Filtering/Filter.coffee @@ -125,7 +125,7 @@ Filter = uniqueID: (post) -> post.info.uniqueID tripcode: (post) -> post.info.tripcode capcode: (post) -> post.info.capcode - subject: (post) -> post.info.subject or undefined + subject: (post) -> post.info.subject comment: (post) -> post.info.comment flag: (post) -> post.info.flag filename: (post) -> post.file?.name diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 2ccfd26af..c45c48d78 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -33,7 +33,7 @@ Build = threadID: data.resto or data.no boardID: boardID # info - name: Build.unescape data.name + name: Build.unescape(data.name) or '' tripcode: data.trip uniqueID: data.id email: Build.unescape data.email @@ -81,8 +81,6 @@ Build = comment file, fileDeleted } = o - name or= '' - subject or= '' isOP = postID is threadID {staticPath, gifIcon} = Build diff --git a/src/General/html/Build/PostInfo.html b/src/General/html/Build/PostInfo.html index 157b84df6..57c47bd13 100644 --- a/src/General/html/Build/PostInfo.html +++ b/src/General/html/Build/PostInfo.html @@ -1,6 +1,6 @@
- ?{isOP || boardID === "f"}{${subject} } + ?{isOP || boardID === "f"}{${subject || ""} } ?{email}{} ${name} diff --git a/src/General/lib/fetcher.class b/src/General/lib/fetcher.class index c604376b3..7b6784c3c 100644 --- a/src/General/lib/fetcher.class +++ b/src/General/lib/fetcher.class @@ -131,14 +131,14 @@ class Fetcher threadID: @threadID boardID: @boardID # info - name: data.name + name: data.name or '' capcode: switch data.capcode when 'M' then 'Mod' when 'A' then 'Admin' when 'D' then 'Developer' tripcode: data.trip uniqueID: data.poster_hash - email: data.email or '' + email: data.email subject: data.title flagCode: data.poster_country flagName: data.poster_country_name diff --git a/src/General/lib/post.class b/src/General/lib/post.class index f62e65377..2a9ab47de 100755 --- a/src/General/lib/post.class +++ b/src/General/lib/post.class @@ -56,7 +56,7 @@ class Post @nodes.nameBlock.textContent.trim() if subject = $ '.subject', info @nodes.subject = subject - @info.subject = subject.textContent + @info.subject = subject.textContent or undefined if name = $ '.name', info @nodes.name = name @info.name = name.textContent