I want to load html content that is in the drupal database.
When I run the query, I get the data but it show to html code (<p>my content - <strong>test</strong></p>) and not the content with layout (my content - test).

Do I need to set something else in the frx file?

CommentFileSizeAuthor
#10 Upcoming_STEOs.frx_.txt1.76 KBstevo70
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hgkris’s picture

Issue summary: View changes
metzlerd’s picture

Set the on any fields containing proper markup xhtml and it will not escape the tags.

Does that make sense?

hgkris’s picture

I don't understand.

I have this code in the frx file.

<div id="show_report_service_text" frx:foreach="*" frx:block="report/loadtextdatabase">{text}</div>

Where do I need to change something in order to view it correct?

metzlerd’s picture

In the headsection of the .frx file include:

<frx:fields>
  <frx:field id="text" format="xhtml"/>
</frx:fields>

This is basically like choosing a field formatter for the {text} field in the user interface, and choosing a format of xhtml. (similar to formatting dates and numbers with forena).

hgkris’s picture

Great! I understand it now.
Thank you so much for all your help.

hgkris’s picture

Status: Active » Closed (fixed)
stevo70’s picture

I did this, and it still wont render the html as it is supposed to.

added the format="xhtml" for that specific field in the .frx file. Do I need to add anything to format-string?

Pierre.Vriens’s picture

Component: Report » Documentation
Status: Closed (fixed) » Active

Stephen, it might help if you can post a sample of your frx file (add a .txt extension or so to get it uploaded as attached file) ...

Also, seems like that format="xhtml" (as in #4) is NOT documented anywhere in the reporting documentation yet. I think it belongs (at least) in reports/help.reportingfrx#fields , but a CTRL-f in that page for 'xhtml' does not show any relevant hits. Hence the status change of this issue (+ component type update).

metzlerd’s picture

Yep, you're correct Pierre, we should fix that. I'll check to see if that is in Drupal 6 version as well. It should be. It's been a while since I've been in D6.

stevo70’s picture

FileSize
1.76 KB

The details field has the code that displays as is: <p>Details</p> &nbsp; etc...

metzlerd’s picture

Hmm... I tested this in the 6.x-2.x dev branch and it worked for me using the syntax I suggested. Are you sure you are getting the right version of the report loading? Can you see the xhtml format when you specify the "fields" section of the wysiwyg editor?

metzlerd’s picture

Can you verify which version of forena you are using after performing the above test?

stevo70’s picture

I was on 6.x-2.2. I installed the dev branch and it worked. I will definitely remember xhtml field as well.
Case Closed.

Thank you for the help!

metzlerd’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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