Commit 937cb604 authored by Bernhard Fürst's avatar Bernhard Fürst
Browse files

Modify regex to match the relevant part of the pad URI only.

parent 6688237d
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
class Onebox::Engine::EtherpadLiteOnebox class Onebox::Engine::EtherpadLiteOnebox
include Onebox::Engine include Onebox::Engine
# Try to guess Etherpad Lite links like http(s)://domain.tld/p/pad-id # Try to guess Etherpad Lite links like http(s)://domain.tld:port/p/pad-id
matches_regexp /^https?:\/\/[^\/]+\/p\/[^\/]+/ matches_regexp /\/p\/[^\/]+$/
# See https://github.com/ether/etherpad-lite/wiki/Embed-Parameters # See https://github.com/ether/etherpad-lite/wiki/Embed-Parameters
def to_html def to_html
......
Supports Markdown
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