Hi Overthere,
I like to implement structured html into my text including some images. Out of the box it doesn't work. Or am I missing something?

Regards,
Ralf

Comments

Ralf R. created an issue. See original summary.

renatog’s picture

Hello Ralf, how are you?

For the moment is not possible use HTML in the modal content because we're using filter_xss on this line:

$text = filter_xss($modal[2]);

It's is for security reasons.

renatog’s picture

Status: Active » Fixed

We create one feature request with your suggestion:

#2997297: Create option to use html (specific tags) inside of Modal Page content.

We can create one feature with this feature

Thank you very much, Ralf.

Best,

renatog’s picture

Hi Ralf.

Done.

Now you can insert HTML in your modal. Insert allowed tags:

Thanks for the suggestion.

https://www.drupal.org/project/modal_page/issues/2997297

Best Regard

Ralf R.’s picture

Hi Renato,
thx for following up on this one :-) Had to do the job in the meantime so wasn't able to use your update for this project.

Tested it a minute ago an found that
<front>|Test|<h1>Test H1</h1><h2>Test H2</h2><h3>Test H3</h3><p>test p</p><img>|Close

is not converted to structured html-output as intended, see screenshot.

Any idea?

Regards,
Ralf

renatog’s picture

Perfect Ralf!

I'll check it for you!

Are you present on Drupal Slack? (drupal.slack.com)

If yes, what's your user?

Shahzaib Ashraf’s picture

Notice: Undefined offset: 1 in modal_page_page_build() (line 63 of C:\xampp\htdocs\drupal\sites\all\modules\modal_page\modal_page.module).
Notice: Undefined offset: 1 in modal_page_page_build() (line 73 of C:\xampp\htdocs\drupal\sites\all\modules\modal_page\modal_page.module).
Notice: Undefined offset: 1 in modal_page_page_build() (line 77 of C:\xampp\htdocs\drupal\sites\all\modules\modal_page\modal_page.module).
Notice: Undefined offset: 1 in modal_page_page_build() (line 63 of C:\xampp\htdocs\drupal\sites\all\modules\modal_page\modal_page.module).
Notice: Undefined offset: 1 in modal_page_page_build() (line 73 of C:\xampp\htdocs\drupal\sites\all\modules\modal_page\modal_page.module).
Notice: Undefined offset: 1 in modal_page_page_build() (line 77 of C:\xampp\htdocs\drupal\sites\all\modules\modal_page\modal_page.module).
I have used Drupal 7 i install Modal page and configure then this error occur. plz resolve my issue.

  • RenatoG committed aa53aa7 on 7.x-1.x
    Issue #2989735 by Ralf R., RenatoG, Shahzaib Ashraf: D7: html and images...
renatog’s picture

@Shahzaib Ashraf, fixed.

Committed to the dev branch.

Can you update and this error has been solved.

renatog’s picture

@Ralf R: I'm checking your issue okay?!

Thank you very much.

Good Work and Good Weekend.

Best,

thalles’s picture

StatusFileSize
new438 bytes

Hi guys, here is a little fix.

Yours faithfully, Thalles

thalles’s picture

Status: Fixed » Needs review

Oops, I forgot to change the status. Adjusted!
:)

renatog’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Category: Support request » Feature request

Thank you Thalles!!

@Ralf, can you check our solution on the patch #11, please?!

Good Weekend guys!

Thanks.

Ralf R.’s picture

Hi Renato, Hi Thalles,
somehow I don't get notified when someone's posting a reply :-(Sorry, for the delay.

Have updated to v1.1 but no structured output, so I assume that Thalles patch isn't incorporated yet?

In case Thalles' patch has to be added... How do I incorporate pat-files into the running D7? I tried

0. Uploaded patch-file to sites/all/modules/modal_page/test.patch

1. terminal to my machine

2. changing directory to sites/all/modules/modal_page

3. patch -p0 -b < test.patch results in:

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/modal_page.module b/modal_page.module
|index 78ed8c2..d4a751b 100644
|--- a/modal_page.module
|+++ b/modal_page.module
--------------------------
File to patch:

Typed in modal_page.module which leads to

patching file modal_page.module
Hunk #1 FAILED at 74.
1 out of 1 hunk FAILED -- saving rejects to file modal_page.module.rej

renatog’s picture

Status: Needs review » Reviewed & tested by the community

Hi Ralf, how are you?

You can apply this patch with this command:

patch -p1 < ~/Downloads/modal_page-html_and_images-2989735.patch

But I checked and this patch really works good.

I'll commit it and you can make just an little update okay?!

  • RenatoG committed 9b6e04a on 7.x-1.x authored by Thalles
    Issue #2989735 by Thalles, Ralf R., RenatoG, Shahzaib Ashraf: D7: html...
renatog’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to the dev branch.

Thank you very much for your good solution Thalles!!

Very good man! Congrats!!

Best,

renatog’s picture

@Ralf R. Was been created the new release: https://ftp.drupal.org/files/projects/modal_page-7.x-1.2.zip

#3003849: Create new release: 7.x-1.2

Can you update, please?!

Now there is this feature:

Thank you very much @Ralf R. and thank you very much @Thalles for you fix!! Good catch dude!!

Good Work and Good Week.

Best,

Ralf R.’s picture

Can confirm. It's working as intended!

Two Thumbs up.

Thx again and a great week to both of you too :-)

thalles’s picture

Thank's @Ralf R!
I am happy, for help you!

Thank's @RenatoG (Renateira)!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.