my_forum 0.0.1.beta52 → 0.0.1.beta53
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49732d0bf16774a11b6c656cb128eec535d14222
|
4
|
+
data.tar.gz: aeb2e91a44eb1e90084ba022fb20f013681f3c81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0ae67c6760ddb7094ac096a51331a71f586b7e1f532e82f1f4b408f71cff52b0fe0de53e2ff6372f8c978d6771e33949aacbb9f42a679dccbea7f1bbc77b2c8
|
7
|
+
data.tar.gz: 1e49c1ecf7ee7da936e2e79c800c939acaba833de8224d33557e9966e33a75a4322ffe71d64ff6a8af1d206a58f1f0e53fd8be12404c2a471aad54cc54620007
|
@@ -62,7 +62,8 @@ module MyForum
|
|
62
62
|
|
63
63
|
# TODO development in progress
|
64
64
|
def get_last_readed_user_page
|
65
|
-
return nil if
|
65
|
+
return nil if current_user.blank?
|
66
|
+
return nil unless params[:page].blank?
|
66
67
|
user_last_page = nil
|
67
68
|
|
68
69
|
latest_readed_post = LogReadMark.where(user_id: current_user.id, topic_id: @topic.id).first
|
@@ -57,8 +57,8 @@ module MyForum
|
|
57
57
|
end
|
58
58
|
|
59
59
|
# Link
|
60
|
-
text.gsub!(/\[url=(.*?)\](.*?)\[\/url\]/i) {
|
61
|
-
text.gsub!(/(http:\/\/[\S]+|www:\/\/[\S]+)/)
|
60
|
+
text.gsub!(/\[url=(.*?)\](.*?)\[\/url\]/i) { link_to($2, $1, target: '_blank') }
|
61
|
+
text.gsub!(/(http:\/\/[\S]+|www:\/\/[\S]+)/i) { link_to($1, $1, target: '_blank') }
|
62
62
|
|
63
63
|
text.html_safe
|
64
64
|
end
|
data/lib/my_forum/engine.rb
CHANGED
@@ -7,7 +7,7 @@ module MyForum
|
|
7
7
|
|
8
8
|
config.after_initialize do
|
9
9
|
ActionView::Base.sanitized_allowed_tags = %w(strong em a img br p i pre div span iframe)
|
10
|
-
ActionView::Base.sanitized_allowed_attributes = %w(href title class src width height)
|
10
|
+
ActionView::Base.sanitized_allowed_attributes = %w(href title class src width height target)
|
11
11
|
end
|
12
12
|
|
13
13
|
config.generators do |g|
|
data/lib/my_forum/version.rb
CHANGED