collavre_notion 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 911a0816f31071621d67860607d4c8351cf3713fd53fde43719e822b8fa06cfb
4
- data.tar.gz: 69c180ccdd9b7de6aa0096d34a1570167a092151dcdffccf8d903f6ac682f877
3
+ metadata.gz: 729f52c6ae7b749fd53d2a7e90027fc1bd9f32c509da40576565c1b1f6e45ced
4
+ data.tar.gz: d8a845888c97101aac2aeb1991da0bb722794c9a2f3992dd882dde1300d166d9
5
5
  SHA512:
6
- metadata.gz: 586a45e62d1009bb7feee452d1699bc73148982ff3bc19a6bc44bfed11e481ecc69ac0645e86e9c7e46d8f89c9c4e62a9b72514e4479869ebd80115390940eac
7
- data.tar.gz: 58b078595daad1d91f27863ae8f57fbc9c31ce1ca8118ae14379d83a67ec5157f3fe260d2b88dbb0db4e5beb35aea44ef816a30bfa05cb460c8429bcf8492e7e
6
+ metadata.gz: 9636f417c31438ac581cedac956e77ba11cc0d9559bf7b4505f9010153f994137896febb72805bc190462007eab9e0ef0ca321670889fdeaa3b9ebd7b07d3bb6
7
+ data.tar.gz: 331e6f434472987110ebc5bc585776abf47cb328041f261565b447aabd936d14637843af962a26c001e541ec577a507f44236a27ee43c7f0c6f2c67387774972
@@ -16,7 +16,7 @@ module CollavreNotion
16
16
 
17
17
  render json: {
18
18
  connected: account.present?,
19
- creative_title: helpers.strip_tags(@creative.effective_origin.description.to_s).strip.presence || "Untitled Creative",
19
+ creative_title: Collavre::HtmlText.label(@creative.effective_origin.description).presence || "Untitled Creative",
20
20
  account: account && {
21
21
  workspace_name: account.workspace_name,
22
22
  workspace_id: account.workspace_id,
@@ -41,8 +41,6 @@ module CollavreNotion
41
41
  return
42
42
  end
43
43
 
44
- Rails.logger.info("Notion Integration Update: Full params = #{params.to_unsafe_h}")
45
-
46
44
  integration_attributes = integration_params
47
45
  Rails.logger.info("Notion Integration Update: integration_params = #{integration_attributes}")
48
46
 
@@ -19,7 +19,7 @@ module CollavreNotion
19
19
  end
20
20
 
21
21
  # Update the existing Notion page with children as blocks
22
- title = ActionController::Base.helpers.strip_tags(creative.description).strip.presence || "Untitled Creative"
22
+ title = Collavre::HtmlText.label(creative.description).presence || "Untitled Creative"
23
23
  children = creative.children.to_a
24
24
  Rails.logger.info("NotionSyncJob: Syncing creative #{creative.id} as page title with #{children.count} children as blocks")
25
25
  blocks = children.any? ? NotionCreativeExporter.new(creative).export_tree_blocks(children, 1, 0) : []
@@ -185,8 +185,8 @@ module CollavreNotion
185
185
  end
186
186
 
187
187
  def extract_text_content(html)
188
- # Remove HTML tags and get plain text
189
- ActionView::Base.full_sanitizer.sanitize(html).strip
188
+ # Remove HTML tags and decode character references
189
+ Collavre::HtmlText.plain(html).strip
190
190
  end
191
191
 
192
192
  def create_heading_block(text, level)
@@ -92,7 +92,7 @@ module CollavreNotion
92
92
  end
93
93
 
94
94
  def create_creative_page(creative, notion_link, parent_page_id)
95
- title = ActionController::Base.helpers.strip_tags(creative.description).strip.presence || "Untitled Creative"
95
+ title = Collavre::HtmlText.label(creative.description).presence || "Untitled Creative"
96
96
 
97
97
  # Export only the children - the page title serves as the root creative
98
98
  children = creative.children.to_a
@@ -123,7 +123,7 @@ module CollavreNotion
123
123
  end
124
124
 
125
125
  def update_creative_page(creative, notion_link)
126
- title = ActionController::Base.helpers.strip_tags(creative.description).strip.presence || "Untitled Creative"
126
+ title = Collavre::HtmlText.label(creative.description).presence || "Untitled Creative"
127
127
 
128
128
  # Update with only the children - page title serves as the root creative
129
129
  children = creative.children.to_a
@@ -1,3 +1,3 @@
1
1
  module CollavreNotion
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collavre_notion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Collavre