Skip to content

Commit

Permalink
Merge pull request #128 from eea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
GhitaB authored Sep 25, 2024
2 parents 346a4ed + d28160f commit fadec23
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
from urllib.parse import urlparse

from bs4 import BeautifulSoup
from clms.addon.adapters.link_to_download import DownloadableLinkFilter
from plone.app.textfield.interfaces import IRichTextValue
from plone.dexterity.interfaces import IDexterityContent
from plone.restapi.interfaces import IContextawareJsonCompatible
from plone.restapi.serializer.converters import json_compatible
from plone.restapi.serializer.utils import uid_to_url
from zope.component import adapter
from zope.interface import implementer
from zope.globalrequest import getRequest


@adapter(IRichTextValue, IDexterityContent)
Expand All @@ -30,7 +32,11 @@ def __call__(self):
value = self.value
output = value.raw

request = getRequest()
filter = DownloadableLinkFilter(self.context, request)
new_output = self.resolve_uids(output)
new_output = filter(new_output)
# print("new output", new_output)

return {
"data": json_compatible(new_output),
Expand Down
2 changes: 1 addition & 1 deletion clms/addon/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.6
11.7
5 changes: 5 additions & 0 deletions docs/HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

11.7 - (2024-09-25)
---------------------------
* Change: Develop
[GhitaB]

11.6 - (2024-09-25)
---------------------------
* Change: Develop
Expand Down

0 comments on commit fadec23

Please sign in to comment.