Skip to content
Snippets Groups Projects
Commit 9e079d75 authored by Gabriel Engel's avatar Gabriel Engel
Browse files

starting final version of oEmbed

parent 69f0c628
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,6 @@ service-configuration
chrismbeckett:toastr
dispatch:kernel
francocatena:status
iframely:oembed
iron:router
jparker:gravatar
konecty:autolinker
......@@ -49,7 +48,7 @@ rocketchat:lib
rocketchat:markdown
rocketchat:me
rocketchat:mentions
rocketchat:tmpembed
rocketchat:oembed
tap:i18n
tmeasday:crypto-md5
tmeasday:errors
......
Package.describe({
name: 'rocketchat:tmpembed',
name: 'rocketchat:oembed',
version: '0.0.1',
summary: 'Message pre-processor that handles embedding of images and maps',
summary: 'Message pre-processor that insert oEmbed widget in template',
git: ''
});
......@@ -10,10 +10,11 @@ Package.onUse(function(api) {
api.use([
'coffeescript',
'iframely:oembed',
'rocketchat:lib@0.0.1'
]);
api.addFiles('tmpembed.coffee', ['server','client']);
api.addFiles('oembed.coffee', ['server','client']);
});
Package.onTest(function(api) {
......
......@@ -13,6 +13,8 @@ Meteor.methods
message.ts = new Date()
message.u = Meteor.users.findOne Meteor.userId(), fields: username: 1
# message.urls = message.msg.match /([A-Za-z]{3,9}):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+~%/\.\w]+)?\??([-\+=&;%@\.\w]+)?#?([\w]+)?)?/g
message.html = message.msg
if _.trim(message.html) isnt ''
message.html = _.escapeHTML message.html
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment