Re: ox-html Incorrectly (?) Puts HTML Into the `` Tag</span></a></span> </h1> <p class="darkgray font13"> <span class="sender pipe"><a href="/search?l=emacs-orgmode@gnu.org&q=from:%22Jacob+S.+Gordon%22" rel="nofollow"><span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Jacob S. Gordon</span></span></a></span> <span class="date"><a href="/search?l=emacs-orgmode@gnu.org&q=date:20250624" rel="nofollow">Tue, 24 Jun 2025 19:34:04 -0700</a></span> </p> </div> <div itemprop="articleBody" class="msgBody"> <!--X-Body-of-Message--> <pre>Hello, I found [this] discussion while trying to strip `org` format markers from the `title` tag during `HTML` export. Is there still interest in this idea? If so, I can submit a patch.</pre><pre> [this] <<a rel="nofollow" href="https://list.orgmode.org/CAHa53uwvvXARYX_Guy_-aMWYoTv=na3dszaphfenafhv9yw...@mail.gmail.com/">https://list.orgmode.org/CAHa53uwvvXARYX_Guy_-aMWYoTv=na3dszaphfenafhv9yw...@mail.gmail.com/</a>> On 2021-04-22 13:34, Tim Visher wrote: > On Thu, Apr 22, 2021 at 11:36 AM Nicolas Goaziou <m...@nicolasgoaziou.fr > <<a rel="nofollow" href="mailto:m...@nicolasgoaziou.fr">mailto:m...@nicolasgoaziou.fr</a>>> wrote: > > Tim Visher <tim.vis...@gmail.com <<a rel="nofollow" href="mailto:tim.vis...@gmail.com">mailto:tim.vis...@gmail.com</a>>> writes: > > > Thanks for the tip. What I'm thinking more is somehow getting the > heading > > pre-output generation, stripping any characters that `org` would > consider > > special (I'm hoping there's already a function that can at least mark > > 'markup' text in a given org string), and _then_ passing it to whatever > ox > > function is responsible for using the title. That way it's as generic > as it > > can possibly be. > > In `org-html--build-meta-info' from "ox-html.el", replace the following > > (org-html-plain-text > (org-element-interpret-data (plist-get info :title)) info) > > with > > (org-export-data-with-backend (plist-get info :title) > (org-export-create-backend > :transcoders > '((bold . (lambda (_ c _) c)) > (italic . (lambda (_ c _) c)))) > info) > > Now re-evaluate the function `org-html--build-meta-info' and try > exporting a document to HTML with a title containing bold and italic > syntax, even nested, e.g. > > #+title: /Some *bold* text/ > > Adding the function `org-export-strip-syntax below to "ox.el" > > (defun org-export-strip-syntax (data info) > (org-export-data-with-backend data > (org-export-create-backend > :transcoders > '((bold . (lambda (_ c _) c)) > (italic . (lambda (_ c _) c)))) > info)) > > you can now call it from any export back-end whenever its needs to > remove syntax from a piece of code. > > You can also drop the info argument and add it to "org-element.el". But > it depends on what you want to obtain. Also, some syntax is not obvious > to strip, as I suggested in my previous message. > > Awesome! This is a ton of great info. If I decide to bite this off I'll be > sure to reference this. :) Thanks, -- Jacob S. Gordon jacob.as.gor...@gmail.com ====================== Please avoid sending me HTML emails and MS Office documents. <a rel="nofollow" href="https://useplaintext.email/#etiquette">https://useplaintext.email/#etiquette</a> <a rel="nofollow" href="https://www.gnu.org/philosophy/no-word-attachments.html">https://www.gnu.org/philosophy/no-word-attachments.html</a> </pre> </div> <div class="msgButtons margintopdouble"> <ul class="overflow"> <li class="msgButtonItems"><a class="button buttonleft " accesskey="p" href="msg165705.html">Previous message</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="c" href="thrd2.html#165708">View by thread</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="i" href="mail2.html#165708">View by date</a></li> <li class="msgButtonItems textalignright"><a class="button buttonright " accesskey="n" href="msg165737.html">Next message</a></li> </ul> </div> <a name="tslice"></a> <div class="tSliceList margintopdouble"> <ul class="icons monospace"> <li class="icons-email tSliceCur"><span class="subject">Re: ox-html Incorrectly (?) Puts HTML Into the `<title&...</span> <span class="sender italic">Jacob S. Gordon</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg165737.html">Re: ox-html Incorrectly (?) Puts HTML Into the `<t...</a></span> <span class="sender italic">Ihor Radchenko</span></li> </ul> </ul> </div> <div class="overflow msgActions margintopdouble"> <div class="msgReply" > <h2> Reply via email to </h2> <form method="POST" action="/mailto.php"> <input type="hidden" name="subject" value="Re: ox-html Incorrectly (?) Puts HTML Into the `<title>` Tag"> <input type="hidden" name="msgid" value="0ec943e3-9a1d-4b19-bae5-cb36a7aad673@gmail.com"> <input type="hidden" name="relpath" value="emacs-orgmode@gnu.org/msg165708.html"> <input type="submit" value=" Jacob S. Gordon "> </form> </div> </div> </div> <div class="aside" role="complementary"> <div class="logo"> <a href="/"><img src="/logo.png" width=247 height=88 alt="The Mail Archive"></a> </div> <form class="overflow" action="/search" method="get"> <input type="hidden" name="l" value="emacs-orgmode@gnu.org"> <label class="hidden" for="q">Search the site</label> <input class="submittext" type="text" id="q" name="q" placeholder="Search emacs-orgmode"> <input class="submitbutton" name="submit" type="image" src="/submit.png" alt="Submit"> </form> <div class="nav margintop" id="nav" role="navigation"> <ul class="icons font16"> <li class="icons-home"><a href="/">The Mail Archive home</a></li> <li class="icons-list"><a href="/emacs-orgmode@gnu.org/">emacs-orgmode - all messages</a></li> <li class="icons-about"><a href="/emacs-orgmode@gnu.org/info.html">emacs-orgmode - about the list</a></li> <li class="icons-expand"><a href="/search?l=emacs-orgmode@gnu.org&q=subject:%22Re%5C%3A+ox%5C-html+Incorrectly+%5C%28%5C%3F%5C%29+Puts+HTML+Into+the+%60%3Ctitle%3E%60+Tag%22&o=newest&f=1" title="e" id="e">Expand</a></li> <li class="icons-prev"><a href="msg165705.html" title="p">Previous message</a></li> <li class="icons-next"><a href="msg165737.html" title="n">Next message</a></li> </ul> </div> <div class="listlogo margintopdouble"> </div> <div class="margintopdouble"> </div> </div> </div> <div class="footer" role="contentinfo"> <ul> <li><a href="/">The Mail Archive home</a></li> <li><a href="/faq.html#newlist">Add your mailing list</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/faq.html#support">Support</a></li> <li><a href="/faq.html#privacy">Privacy</a></li> <li class="darkgray">0ec943e3-9a1d-4b19-bae5-cb36a7aad673@gmail.com</li> </ul> </div> </body> </html>