From 25bdc789215c728e6fac04404adcf1f8e4bcdd78 Mon Sep 17 00:00:00 2001 From: pdp8 Date: Sun, 30 Jul 2023 01:27:51 +0200 Subject: html links for outbox notes --- create.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'create.rb') diff --git a/create.rb b/create.rb index d986812..301417f 100644 --- a/create.rb +++ b/create.rb @@ -40,6 +40,9 @@ post '/create' do # TODO } end break + elsif line.match(url_regexp) + # single quotes in html invalidate digest, reason unknown + content << line.gsub(Regexp.last_match(0), "#{Regexp.last_match(0)}") else tags = line.split(/\s+/).grep(hashtag_regexp) tags.each do |name| @@ -49,6 +52,8 @@ post '/create' do # TODO 'href' => tag_url, 'name' => name } + # single quotes in html invalidate digest, reason unknown + line.gsub!(name, "#{name}") end mentions = line.split(/\s+/).grep(mention_regexp) mentions.each do |mention| @@ -58,6 +63,8 @@ post '/create' do # TODO 'href' => actor, 'name' => mention } + # single quotes in html invalidate digest, reason unknown + line.gsub!(mention, "#{mention}") end content << line end -- cgit v1.2.3