function! s:HtmlUnescape(string)
let string = a:string
while match(string, '&#\d\+;') != -1
let num = matchstr(string, '&#\zs\d\+\ze;')
"@"
" "
let string = substitute(
string, '&#\d\+;', nr2char(num), '')
endwhile
let string = substitute(string, '>', '>', 'g')
let string = substitute(string, '<', '<', 'g')
let string = substitute(string, '"', '"', 'g')
let string = substitute(string, '&', '\&', 'g')
return string
endfunction
function! s:GetBaseURLAndUser(hatena_user)
let pair = split(a:hatena_user, ':')
if len(pair) > 1
let base_url = printf(s:hatena_group_base_url, pair[0])
let user = pair[1]
else
let base_url = s:hatena_base_url
let user = a:hatena_user
endif
return [base_url, user]
endfunction