Insert missing encodeURIComponent on data-board attribute in Get.threadFromRoot.

This commit is contained in:
ccd0 2018-12-09 07:28:11 -08:00
parent 19026f0649
commit 6a54b55ede

View File

@ -10,7 +10,8 @@ Get =
excerpt
threadFromRoot: (root) ->
return null unless root?
g.threads["#{root.dataset.board or g.BOARD.ID}.#{root.id.match(/\d*$/)[0]}"]
{board} = root.dataset
g.threads["#{if board then encodeURIComponent(board) else g.BOARD.ID}.#{root.id.match(/\d*$/)[0]}"]
threadFromNode: (node) ->
Get.threadFromRoot $.x "ancestor-or-self::#{Site.xpath.thread}", node
postFromRoot: (root) ->