Commit 83f79196 authored by Ujvari Gergely's avatar Ujvari Gergely

Standalone page escaping cleanup:

- Removed ng-inits
- Removed escaping from backend
- Removed de-escaping from frontend
- Removed no longer used tal tags
parent ebe79270
...@@ -15,11 +15,11 @@ class Displayer ...@@ -15,11 +15,11 @@ class Displayer
this.$inject = ['$scope','$element','$timeout','streamfilter'] this.$inject = ['$scope','$element','$timeout','streamfilter']
constructor: ($scope, $element, $timeout, streamfilter) -> constructor: ($scope, $element, $timeout, streamfilter) ->
$scope.annotation = {} $scope.root = document.init_annotation
$scope.annotation = $scope.root.annotation
$scope.annotations = [$scope.annotation] $scope.annotations = [$scope.annotation]
$scope.annotation.replies = [] $scope.annotation.replies = []
$scope.annotation.reply_count = 0 $scope.annotation.reply_count = 0
$scope.annotation.id = document.body.attributes.internalid.value
@idTable[$scope.annotation.id] = $scope.annotation @idTable[$scope.annotation.id] = $scope.annotation
$scope.filter = $scope.filter =
streamfilter streamfilter
...@@ -114,9 +114,10 @@ class Displayer ...@@ -114,9 +114,10 @@ class Displayer
replies.splice pos, 1 replies.splice pos, 1
delete @idTable[annotation.id] delete @idTable[annotation.id]
if document.initial_replies? if $scope.annotation.referrers?
$scope.manage_new_data document.initial_replies, 'past' $scope.manage_new_data $scope.annotation.referrers, 'past'
document.initial_replies = ''
document.init_annotation = null
$scope.open() $scope.open()
angular.module('h.displayer',['h.streamfilter','h.filters','bootstrap']) angular.module('h.displayer',['h.streamfilter','h.filters','bootstrap'])
......
...@@ -44,14 +44,9 @@ elide = (text, split_length) -> ...@@ -44,14 +44,9 @@ elide = (text, split_length) ->
text = text + '\u2026' text = text + '\u2026'
text text
descapeSingleQuote = (text) ->
if text
text = text.replace /'/g, "'"
text
angular.module('h.filters', []) angular.module('h.filters', [])
.filter('converter', -> (new Converter()).makeHtml) .filter('converter', -> (new Converter()).makeHtml)
.filter('fuzzyTime', -> fuzzyTime) .filter('fuzzyTime', -> fuzzyTime)
.filter('userName', -> userName) .filter('userName', -> userName)
.filter('elide', -> elide) .filter('elide', -> elide)
.filter('descSingleQuote', -> descapeSingleQuote)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment