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:%22Tim+Visher%22" rel="nofollow"><span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Tim Visher</span></span></a></span> <span class="date"><a href="/search?l=emacs-orgmode@gnu.org&q=date:20210112" rel="nofollow">Tue, 12 Jan 2021 06:54:01 -0800</a></span> </p> </div> <div itemprop="articleBody" class="msgBody"> <!--X-Body-of-Message--> <pre>On Mon, Jan 11, 2021 at 8:19 PM Kyle Meyer <k...@kyleam.com> wrote: > Tim Visher writes: > > > Hi all, > > > > I noticed over the weekend that the `<title>` tag in an ox-html document > is > > populated with HTML when inline formatting like bold or italics is used. > [...] > > Is this something we'd take a patch for? > > Thanks for reporting. Is this addressed by the in-progress series at > <<a rel="nofollow" href="https://orgmode.org/list/87o8hwpz34....@gmail.com/">https://orgmode.org/list/87o8hwpz34....@gmail.com/</a>>? ></pre><pre> IIUC yes. I believe the following section of the diff should address it. ``` + (let* ((title (org-html-plain-text + (org-element-interpret-data (plist-get info :title)) info)) + ;; Set title to an invisible character instead of leaving it + ;; empty, which is invalid. + (title (if (org-string-nw-p title) title "&lrm;")) ``` If I'm reading the code correctly, `org-html-plain-text` is a specialized form of converting org data into a plain text string with no markup. If I have that correct then I believe you're right. Is that your read as well? </pre> </div> <div class="msgButtons margintopdouble"> <ul class="overflow"> <li class="msgButtonItems"><a class="button buttonleft " accesskey="p" href="msg133521.html">Previous message</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="c" href="thrd8.html#133527">View by thread</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="i" href="mail9.html#133527">View by date</a></li> <li class="msgButtonItems textalignright"><a class="button buttonright " accesskey="n" href="msg133538.html">Next message</a></li> </ul> </div> <a name="tslice"></a> <div class="tSliceList margintopdouble"> <ul class="icons monospace"> <li class="icons-email"><span class="subject"><a href="msg133514.html">ox-html Incorrectly (?) Puts HTML Into the `<...</a></span> <span class="sender italic">Tim Visher</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg133521.html">Re: ox-html Incorrectly (?) Puts HTML Into ...</a></span> <span class="sender italic">Kyle Meyer</span></li> <li><ul> <li class="icons-email tSliceCur"><span class="subject">Re: ox-html Incorrectly (?) Puts HTML I...</span> <span class="sender italic">Tim Visher</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg133538.html">Re: ox-html Incorrectly (?) Puts HT...</a></span> <span class="sender italic">Kyle Meyer</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg133550.html">Re: ox-html Incorrectly (?) Put...</a></span> <span class="sender italic">Tim Visher</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg133653.html">Re: ox-html Incorrectly (?...</a></span> <span class="sender italic">Kyle Meyer</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg134730.html">Re: ox-html Incorrectl...</a></span> <span class="sender italic">Tim Visher</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg134987.html">Re: ox-html Incorr...</a></span> <span class="sender italic">Tim Visher</span></li> <li class="icons-email"><span class="subject"><a href="msg135141.html">Re: ox-html Incorr...</a></span> <span class="sender italic">Kyle Meyer</span></li> <li class="icons-email"><span class="subject"><a href="msg135155.html">Re: ox-html Incorr...</a></span> <span class="sender italic">Jens Lechtenboerger</span></li> <li class="icons-email"><span class="subject"><a href="msg135171.html">Re: ox-html Incorr...</a></span> <span class="sender italic">Tim Visher</span></li> <li class="icons-email"><span class="subject"><a href="msg135175.html">Re: ox-html Incorr...</a></span> <span class="sender italic">Jens Lechtenboerger</span></li> <li class="icons-email"><span class="subject"><a href="msg135177.html">Re: ox-html Incorr...</a></span> <span class="sender italic">Dr. Arne Babenhauserheide</span></li> </ul> </ul> </ul> </ul> </ul> </ul> </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="CAHa53uzYX5iUk-xmC_np4Vi_YyawQKdXXeOMHoV79qDDtkudGQ@mail.gmail.com"> <input type="hidden" name="relpath" value="emacs-orgmode@gnu.org/msg133527.html"> <input type="submit" value=" Tim Visher "> </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="msg133521.html" title="p">Previous message</a></li> <li class="icons-next"><a href="msg133538.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">CAHa53uzYX5iUk-xmC_np4Vi_YyawQKdXXeOMHoV79qDDtkudGQ@mail.gmail.com</li> </ul> </div> </body> </html>