Use the title= HTML attribute with RMarkdown - r-markdown

I am trying to understand if it is possible to insert the HTML title= attribute (not necessarily inside an <abbr> tag) within an RMarkdown document (e.g. a blog post written through blogdown)
From W3C: the title attribute specifies extra information about an element. The information is most often shown as a tooltip text when the mouse moves over the element.
The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.
Couldn't find anything regarding using in in RMarkdown tho

You can write raw HTML in Markdown. However, if you are using Hugo >= v0.60.0, raw HTML will be ignored by default. You need to set an option in your config file to enable it:
[markup.goldmark.renderer]
unsafe= true

Related

Oracle APEX - hyperlink shown as text on a static region

I have a static region and I want to set it to some text with a hyperlink. Text comes from the database - returned by a function.
So I added a page item (P1_LINK_TEXT) to the page and added a computation to my page item that is set to PL/SQL expression:
MyFunction('MY_TEXT')
The region Header Text to &P1_LINK_TEXT.
It works great, except the hyperlink displayed as is - Click here
instead of displaying the link. I made sure that Attributes->Settings->Output As is set to HTML but still, the hyperlink is not displayed correctly. What am I doing wrong?
Use the escape filter to ensure html characters are not escaped. To display the item as html use this notation:
&P1_LINK_TEXT!RAW.

how to remove html tags in django template on browser while showing to user

As shown in figure i used {{options|safe}} for rendering options in my django 3.0 polls application even though it is rendering like that and i don't know how to remove the tags from rendered string, thanks for help in advance
regarding tag error
To remove tags, I would recommend using Mozilla's bleach library.
In order to remove tags only in the front-end, not the data itself, you can easily create a custom template filter and clean the tags inside it.
Another cool idea would be to have list of enabled HTML tags that can be used (like making text bold with <b>...</b>) and then render the input as a valid html:
{{ options|remove_tags|safe }}
Example for a custom template filter:
#register.filter
def remove_tags(value):
return bleach.clean(value, tags=["b", "i"])

Problem by adding truncateworld and safe tags

I use Django 1.11 for my blog.
I illustrate all acticles in my first page by a title, an image and a few words.
For the few words, I'm using this method :
{{post.text|safe|linebreaks|truncatewords:"50"}}
I use a text editor and sometimes, I use for example italic text :
<i/>Italic text</i>
Let's imagine the value of truncatewords is on "1". It means it returns :
<i/>Italic
There is my problem. Some HTML tags are still opened. It means that the italic text never end and It will be applied for the rest of the code.
Do you know if a trick or workaround exists ?
Thank you.

OrchardCMS Replacement Tokens for Query Results displaying HTML tags instead rendering them

I am having problems understanding the token system for the output of query / projections.
If I leave the property as is it displays the text content with HTML formatting intact.
But I need to wrap it with a tag, the html tags get displayed as text.
Rewrite Results -> Rewrite output
<div class="collapse" id="toggle_{Content.Id}">
{Content.Fields.CaseStudy.ClientChallenge} </div>
I am trying to create a collapsible text area, I already have a button that hides/unhides the content.
Why is it displaying as text instead of rendering the tags properly.
I think this is because I don't know how replacement tokens work.
Another example problem is up one level on the edit Layout, I want to set the item class to work-item {Category}, Category being the name/title of a property, which I am using for grouping.
Right above the projection: I want to include some html that lists all the Categorys in a ul i.e. data-filter=".experiential" I have tried things like: work-item {Category} and work-item {Content.Fields.CaseStudy.Category}. Category is a "term" (?) from a taxonomy.
I feel like I am failing to understand how it all works.
Submitted as a bug https://github.com/OrchardCMS/Orchard/issues/7355
Will edit and post if it is fixed. In case anoyong else comes across this issue.

WYSIWYG editor pastes html tags in output textfield

I use this redactor for admin site django-wysiwyg-redactor
But when I enter some text, it pastes it with html tags. When discovering my source code, I noticed that html code that is responsible for my input data, is placed in quotes.
I think you have to use "safe", the built-in template filter to render the html properly in your template. Example:
{{ myTextField|safe }}
Safe in django docs