CINXE.COM
Module:string/encode entities - Wiktionary, the free dictionary
<!DOCTYPE html> <html class="client-nojs" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Module:string/encode entities - Wiktionary, the free dictionary</title> <script>(function(){var className="client-js";var cookie=document.cookie.match(/(?:^|; )enwiktionarymwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"ad9ae764-b955-4272-a704-6ad45bdf0791","wgCanonicalNamespace":"Module","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":828,"wgPageName":"Module:string/encode_entities","wgTitle":"string/encode entities","wgCurRevisionId":78846240,"wgRevisionId":78846240,"wgArticleId":10136341,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null, "wgUserGroups":["*"],"wgCategories":["Uncategorized modules","Templates and modules needing documentation"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"Scribunto","wgRelevantPageName":"Module:string/encode_entities","wgRelevantArticleId":10136341,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":["templateeditor"],"wgRestrictionMove":["templateeditor"],"wgNoticeProject":"wiktionary","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":800,"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":true,"wgVector2022LanguageInHeader":false, "wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q125377784","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"]};RLSTATE={"ext.gadget.LanguagesAndScripts":"ready","ext.gadget.Palette":"ready","ext.gadget.Site":"ready","ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.pygments":"ready","skins.vector.styles.legacy":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","codex-search-styles":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.pygments.view","site","mediawiki.page.ready","skins.vector.legacy.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.LegacyScripts","ext.gadget.DocTabs","ext.gadget.RevdelInfo","ext.gadget.PagePreviews","ext.gadget.Edittools", "ext.gadget.defaultVisibilityToggles","ext.gadget.UnsupportedTitles","ext.gadget.WiktGadgetPrefs","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.compactlinks","ext.uls.interface","ext.checkUser.clientHints","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=codex-search-styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cskins.vector.styles.legacy%7Cwikibase.client.init&only=styles&skin=vector"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.gadget.LanguagesAndScripts%2CPalette%2CSite&only=styles&skin=vector"> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:site_name" content="Wiktionary"> <meta property="og:title" content="Module:string/encode entities - Wiktionary, the free dictionary"> <meta property="og:type" content="website"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wiktionary.org/wiki/Module:string/encode_entities"> <link rel="apple-touch-icon" href="/static/apple-touch/wiktionary/en.png"> <link rel="icon" href="/static/favicon/wiktionary/en.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wiktionary (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wiktionary.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wiktionary.org/wiki/Module:string/encode_entities"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wiktionary Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin-vector-legacy mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-828 ns-subject page-Module_string_encode_entities rootpage-Module_string skin-vector action-view"><div id="mw-page-base" class="noprint"></div> <div id="mw-head-base" class="noprint"></div> <div id="content" class="mw-body" role="main"> <a id="top"></a> <div id="siteNotice"><!-- CentralNotice --></div> <div class="mw-indicators"> </div> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-namespace">Module</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">string/encode entities</span></h1> <div id="bodyContent" class="vector-body"> <div id="siteSub" class="noprint">From Wiktionary, the free dictionary</div> <div id="contentSub"><div id="mw-content-subtitle"><div class="subpages">< <bdi dir="ltr"><a href="/wiki/Module:string" title="Module:string">Module:string</a></bdi></div></div></div> <div id="contentSub2"></div> <div id="jump-to-nav"></div> <a class="mw-jump-link" href="#mw-head">Jump to navigation</a> <a class="mw-jump-link" href="#searchInput">Jump to search</a> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="documentation" style="display:block; clear:both"> <hr /> <dl class="plainlinks" style="font-size: smaller;"><dd><i style="font-size: larger;">This module lacks a <a href="/wiki/Help:Documenting_templates_and_modules" title="Help:Documenting templates and modules">documentation subpage</a>. Please <a class="external text" href="https://en.wiktionary.org/w/index.php?title=Module:string/encode_entities/documentation&action=edit&preload=Template%3Adocumentation%2FpreloadModule">create it</a>.</i></dd> <dd> <i>Useful links</i>: <a href="/wiki/Module:string" title="Module:string">root page</a> • <a href="/wiki/Special:PrefixIndex/Module:string/" title="Special:PrefixIndex/Module:string/">root page’s subpages</a> • <a class="external text" href="https://en.wiktionary.org/w/index.php?title=Special%3AWhatLinksHere%2FModule%3Astring%2Fencode_entities&hideredirs=1&hidetrans=1">links</a> • <a class="external text" href="https://en.wiktionary.org/w/index.php?title=Special%3AWhatLinksHere%2FModule%3Astring%2Fencode_entities&hidelinks=1&hideredirs=1">transclusions</a> • <a href="/w/index.php?title=Module:string/encode_entities/testcases&action=edit&redlink=1" class="new" title="Module:string/encode entities/testcases (page does not exist)">testcases</a> • <a href="/w/index.php?title=Module:string/encode_entities/sandbox&action=edit&redlink=1" class="new" title="Module:string/encode entities/sandbox (page does not exist)">sandbox</a></dd></dl> <br style="clear: both;" /></div> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span id="L-1"><a href="#L-1"><span class="linenos" data-line="1"></span></a><span class="kd">local</span> <span class="n">m_str_utils</span> <span class="o">=</span> <span class="nb">require</span><span class="p">(</span><span class="s2">"Module:string utilities"</span><span class="p">)</span> </span><span id="L-2"><a href="#L-2"><span class="linenos" data-line="2"></span></a> </span><span id="L-3"><a href="#L-3"><span class="linenos" data-line="3"></span></a><span class="kd">local</span> <span class="n">codepoint</span> <span class="o">=</span> <span class="n">m_str_utils</span><span class="p">.</span><span class="n">codepoint</span> </span><span id="L-4"><a href="#L-4"><span class="linenos" data-line="4"></span></a><span class="kd">local</span> <span class="n">decode_entities</span> <span class="o">=</span> <span class="n">m_str_utils</span><span class="p">.</span><span class="n">decode_entities</span> </span><span id="L-5"><a href="#L-5"><span class="linenos" data-line="5"></span></a><span class="kd">local</span> <span class="n">find</span> <span class="o">=</span> <span class="nb">string.find</span> </span><span id="L-6"><a href="#L-6"><span class="linenos" data-line="6"></span></a><span class="kd">local</span> <span class="n">format</span> <span class="o">=</span> <span class="nb">string.format</span> </span><span id="L-7"><a href="#L-7"><span class="linenos" data-line="7"></span></a><span class="kd">local</span> <span class="n">gsub</span> <span class="o">=</span> <span class="nb">string.gsub</span> </span><span id="L-8"><a href="#L-8"><span class="linenos" data-line="8"></span></a><span class="kd">local</span> <span class="n">match</span> <span class="o">=</span> <span class="nb">string.match</span> </span><span id="L-9"><a href="#L-9"><span class="linenos" data-line="9"></span></a><span class="kd">local</span> <span class="n">pattern_escape</span> <span class="o">=</span> <span class="n">m_str_utils</span><span class="p">.</span><span class="n">pattern_escape</span> </span><span id="L-10"><a href="#L-10"><span class="linenos" data-line="10"></span></a> </span><span id="L-11"><a href="#L-11"><span class="linenos" data-line="11"></span></a><span class="kd">local</span> <span class="kr">function</span> <span class="nf">encode_entity</span><span class="p">(</span><span class="n">ch</span><span class="p">)</span> </span><span id="L-12"><a href="#L-12"><span class="linenos" data-line="12"></span></a> <span class="kr">return</span> <span class="s2">"&#x"</span> <span class="o">..</span> <span class="n">format</span><span class="p">(</span><span class="s2">"%X"</span><span class="p">,</span> <span class="n">codepoint</span><span class="p">(</span><span class="n">ch</span><span class="p">))</span> <span class="o">..</span> <span class="s2">";"</span> </span><span id="L-13"><a href="#L-13"><span class="linenos" data-line="13"></span></a><span class="kr">end</span> </span><span id="L-14"><a href="#L-14"><span class="linenos" data-line="14"></span></a> </span><span id="L-15"><a href="#L-15"><span class="linenos" data-line="15"></span></a><span class="kr">return</span> <span class="kr">function</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="n">charset</span><span class="p">,</span> <span class="n">raw</span><span class="p">)</span> </span><span id="L-16"><a href="#L-16"><span class="linenos" data-line="16"></span></a> <span class="kr">if</span> <span class="ow">not</span> <span class="n">raw</span> <span class="kr">then</span> </span><span id="L-17"><a href="#L-17"><span class="linenos" data-line="17"></span></a> <span class="n">text</span> <span class="o">=</span> <span class="n">decode_entities</span><span class="p">(</span><span class="n">text</span><span class="p">)</span> </span><span id="L-18"><a href="#L-18"><span class="linenos" data-line="18"></span></a> <span class="kr">end</span> </span><span id="L-19"><a href="#L-19"><span class="linenos" data-line="19"></span></a> <span class="kr">if</span> <span class="n">charset</span> <span class="o">==</span> <span class="s2">""</span> <span class="kr">then</span> </span><span id="L-20"><a href="#L-20"><span class="linenos" data-line="20"></span></a> <span class="kr">return</span> <span class="n">text</span> </span><span id="L-21"><a href="#L-21"><span class="linenos" data-line="21"></span></a> <span class="kr">elseif</span> <span class="ow">not</span> <span class="n">charset</span> <span class="kr">then</span> </span><span id="L-22"><a href="#L-22"><span class="linenos" data-line="22"></span></a> <span class="n">charset</span> <span class="o">=</span> <span class="s2">"</span><span class="se">\"</span><span class="s2">&'<></span><span class="se">\194\160</span><span class="s2">"</span> </span><span id="L-23"><a href="#L-23"><span class="linenos" data-line="23"></span></a> <span class="kr">elseif</span> <span class="ow">not</span> <span class="n">match</span><span class="p">(</span><span class="n">charset</span><span class="p">,</span> <span class="s2">"[</span><span class="se">\128</span><span class="s2">-</span><span class="se">\244</span><span class="s2">]"</span><span class="p">)</span> <span class="kr">then</span> </span><span id="L-24"><a href="#L-24"><span class="linenos" data-line="24"></span></a> <span class="kr">return</span> <span class="p">(</span><span class="n">gsub</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="s2">"["</span> <span class="o">..</span> <span class="n">pattern_escape</span><span class="p">(</span><span class="n">charset</span><span class="p">)</span> <span class="o">..</span> <span class="s2">"]"</span><span class="p">,</span> <span class="n">encode_entity</span><span class="p">))</span> </span><span id="L-25"><a href="#L-25"><span class="linenos" data-line="25"></span></a> <span class="kr">end</span> </span><span id="L-26"><a href="#L-26"><span class="linenos" data-line="26"></span></a> <span class="kr">return</span> <span class="p">(</span><span class="n">gsub</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="s2">"[%z</span><span class="se">\1</span><span class="s2">-</span><span class="se">\127\194</span><span class="s2">-</span><span class="se">\244</span><span class="s2">][</span><span class="se">\128</span><span class="s2">-</span><span class="se">\191</span><span class="s2">]*"</span><span class="p">,</span> <span class="kr">function</span><span class="p">(</span><span class="n">ch</span><span class="p">)</span> </span><span id="L-27"><a href="#L-27"><span class="linenos" data-line="27"></span></a> <span class="kr">return</span> <span class="n">find</span><span class="p">(</span><span class="n">charset</span><span class="p">,</span> <span class="n">ch</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="kc">true</span><span class="p">)</span> <span class="ow">and</span> <span class="n">encode_entity</span><span class="p">(</span><span class="n">ch</span><span class="p">)</span> <span class="ow">or</span> <span class="kc">nil</span> </span><span id="L-28"><a href="#L-28"><span class="linenos" data-line="28"></span></a> <span class="kr">end</span><span class="p">))</span> </span><span id="L-29"><a href="#L-29"><span class="linenos" data-line="29"></span></a><span class="kr">end</span> </span></pre></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐f69cdc8f6‐rxt7p Cached time: 20241124132932 Cache expiry: 2592000 Reduced expiry: false Complications: [] CPU time usage: 0.041 seconds Real time usage: 0.055 seconds Preprocessor visited node count: 12/1000000 Post‐expand include size: 2110/2097152 bytes Template argument size: 0/2097152 bytes Highest expansion depth: 3/100 Expensive parser function count: 2/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 0/5000000 bytes Lua time usage: 0.021/10.000 seconds Lua memory usage: 947086/104857600 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 46.815 1 Template:documentation 100.00% 46.815 1 -total --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wiktionary.org/w/index.php?title=Module:string/encode_entities&oldid=78846240">https://en.wiktionary.org/w/index.php?title=Module:string/encode_entities&oldid=78846240</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Special:Categories" title="Special:Categories">Categories</a>: <ul><li><a href="/wiki/Category:Uncategorized_modules" title="Category:Uncategorized modules">Uncategorized modules</a></li><li><a href="/wiki/Category:Templates_and_modules_needing_documentation" title="Category:Templates and modules needing documentation">Templates and modules needing documentation</a></li></ul></div></div> </div> </div> <div id="mw-navigation"> <h2>Navigation menu</h2> <div id="mw-head"> <nav id="p-personal" class="mw-portlet mw-portlet-personal vector-user-menu-legacy vector-menu" aria-labelledby="p-personal-label" > <h3 id="p-personal-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Personal tools</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anonuserpage" class="mw-list-item"><span title="The user page for the IP address you are editing as">Not logged in</span></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li><li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-createaccount" class="mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=Module%3Astring%2Fencode+entities" title="You are encouraged to create an account and log in; however, it is not mandatory"><span>Create account</span></a></li><li id="pt-login" class="mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=Module%3Astring%2Fencode+entities" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o"><span>Log in</span></a></li> </ul> </div> </nav> <div id="left-navigation"> <nav id="p-namespaces" class="mw-portlet mw-portlet-namespaces vector-menu-tabs vector-menu-tabs-legacy vector-menu" aria-labelledby="p-namespaces-label" > <h3 id="p-namespaces-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Namespaces</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-module" class="selected mw-list-item"><a href="/wiki/Module:string/encode_entities" title="View the module page [c]" accesskey="c"><span>Module</span></a></li><li id="ca-talk" class="new mw-list-item"><a href="/w/index.php?title=Module_talk:string/encode_entities&action=edit&redlink=1" rel="discussion" class="new" title="Discussion about the content page (page does not exist) [t]" accesskey="t"><span>Discussion</span></a></li> </ul> </div> </nav> <nav id="p-variants" class="mw-portlet mw-portlet-variants emptyPortlet vector-menu-dropdown vector-menu" aria-labelledby="p-variants-label" > <input type="checkbox" id="p-variants-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-variants" class="vector-menu-checkbox" aria-labelledby="p-variants-label" > <label id="p-variants-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">English</span> </label> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </nav> </div> <div id="right-navigation"> <nav id="p-views" class="mw-portlet mw-portlet-views vector-menu-tabs vector-menu-tabs-legacy vector-menu" aria-labelledby="p-views-label" > <h3 id="p-views-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Views</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected mw-list-item"><a href="/wiki/Module:string/encode_entities"><span>Read</span></a></li><li id="ca-viewsource" class="mw-list-item"><a href="/w/index.php?title=Module:string/encode_entities&action=edit" title="This page is protected. You can view its source [e]" accesskey="e"><span>View source</span></a></li><li id="ca-history" class="mw-list-item"><a href="/w/index.php?title=Module:string/encode_entities&action=history" title="Past revisions of this page [h]" accesskey="h"><span>History</span></a></li> </ul> </div> </nav> <nav id="p-cactions" class="mw-portlet mw-portlet-cactions emptyPortlet vector-menu-dropdown vector-menu" aria-labelledby="p-cactions-label" title="More options" > <input type="checkbox" id="p-cactions-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-cactions" class="vector-menu-checkbox" aria-labelledby="p-cactions-label" > <label id="p-cactions-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">More</span> </label> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </nav> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <h3 >Search</h3> <form action="/w/index.php" id="searchform" class="vector-search-box-form"> <div id="simpleSearch" class="vector-search-box-inner" data-search-loc="header-navigation"> <input class="vector-search-box-input" type="search" name="search" placeholder="Search Wiktionary" aria-label="Search Wiktionary" autocapitalize="none" title="Search Wiktionary [f]" accesskey="f" id="searchInput" > <input type="hidden" name="title" value="Special:Search"> <input id="mw-searchButton" class="searchButton mw-fallbackSearchButton" type="submit" name="fulltext" title="Search the pages for this text" value="Search"> <input id="searchButton" class="searchButton" type="submit" name="go" title="Go to a page with this exact name if it exists" value="Go"> </div> </form> </div> </div> </div> <div id="mw-panel" class="vector-legacy-sidebar"> <div id="p-logo" role="banner"> <a class="mw-wiki-logo" href="/wiki/Wiktionary:Main_Page" title="Visit the main page"></a> </div> <nav id="p-navigation" class="mw-portlet mw-portlet-navigation vector-menu-portal portal vector-menu" aria-labelledby="p-navigation-label" > <h3 id="p-navigation-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Navigation</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-text" class="mw-list-item"><a href="/wiki/Wiktionary:Main_Page"><span>Main Page</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wiktionary:Community_portal" title="About the project, what you can do, where to find things"><span>Community portal</span></a></li><li id="n-requestedarticles" class="mw-list-item"><a href="/wiki/Wiktionary:Requested_entries"><span>Requested entries</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Load a random page [x]" accesskey="x"><span>Random entry</span></a></li><li id="n-help" class="mw-list-item"><a href="https://en.wiktionary.org/wiki/Help:Contents" title="The place to find out"><span>Help</span></a></li><li id="n-Glossary" class="mw-list-item"><a href="/wiki/Appendix:Glossary"><span>Glossary</span></a></li><li id="n-sitesupport" class="mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wiktionary.org&uselang=en" title="Support us"><span>Donations</span></a></li><li id="n-contact" class="mw-list-item"><a href="/wiki/Wiktionary:Contact_us"><span>Contact us</span></a></li> </ul> </div> </nav> <nav id="p-tb" class="mw-portlet mw-portlet-tb vector-menu-portal portal vector-menu" aria-labelledby="p-tb-label" > <h3 id="p-tb-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Tools</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Module:string/encode_entities" title="A list of all wiki pages that link here [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Module:string/encode_entities" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=en" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Module:string/encode_entities&oldid=78846240" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Module:string/encode_entities&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wiktionary.org%2Fwiki%2FModule%3Astring%2Fencode_entities"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fen.wiktionary.org%2Fwiki%2FModule%3Astring%2Fencode_entities"><span>Download QR code</span></a></li> </ul> </div> </nav> <nav id="p-electronpdfservice-sidebar-portlet-heading" class="mw-portlet mw-portlet-electronpdfservice-sidebar-portlet-heading vector-menu-portal portal vector-menu" aria-labelledby="p-electronpdfservice-sidebar-portlet-heading-label" > <h3 id="p-electronpdfservice-sidebar-portlet-heading-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Print/export</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="electron-print_pdf" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=Module%3Astring%2Fencode_entities&action=show-download-screen"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="javascript:print();" rel="alternate" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </nav> <nav id="p-wikibase-otherprojects" class="mw-portlet mw-portlet-wikibase-otherprojects vector-menu-portal portal vector-menu" aria-labelledby="p-wikibase-otherprojects-label" > <h3 id="p-wikibase-otherprojects-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">In other projects</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q125377784" title="Link to connected data repository item [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </nav> <nav id="p-lang" class="mw-portlet mw-portlet-lang vector-menu-portal portal vector-menu" aria-labelledby="p-lang-label" > <h3 id="p-lang-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">In other languages</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ang mw-list-item"><a href="https://ang.wiktionary.org/wiki/Module:string/encode_entities" title="Module:string/encode entities – Old English" lang="ang" hreflang="ang" data-title="Module:string/encode entities" data-language-autonym="Ænglisc" data-language-local-name="Old English" class="interlanguage-link-target"><span>Ænglisc</span></a></li><li class="interlanguage-link interwiki-bn mw-list-item"><a href="https://bn.wiktionary.org/wiki/%E0%A6%AE%E0%A6%A1%E0%A6%BF%E0%A6%89%E0%A6%B2:string/encode_entities" title="মডিউল:string/encode entities – Bangla" lang="bn" hreflang="bn" data-title="মডিউল:string/encode entities" data-language-autonym="বাংলা" data-language-local-name="Bangla" class="interlanguage-link-target"><span>বাংলা</span></a></li><li class="interlanguage-link interwiki-dv mw-list-item"><a href="https://dv.wiktionary.org/wiki/%DE%89%DE%AE%DE%91%DE%A8%DE%87%DE%AA%DE%8D%DE%B0:string/encode_entities" title="މޮޑިއުލް:string/encode entities – Divehi" lang="dv" hreflang="dv" data-title="މޮޑިއުލް:string/encode entities" data-language-autonym="ދިވެހިބަސް" data-language-local-name="Divehi" class="interlanguage-link-target"><span>ދިވެހިބަސް</span></a></li><li class="interlanguage-link interwiki-hsb mw-list-item"><a href="https://hsb.wiktionary.org/wiki/Modul:string/encode_entities" title="Modul:string/encode entities – Upper Sorbian" lang="hsb" hreflang="hsb" data-title="Modul:string/encode entities" data-language-autonym="Hornjoserbsce" data-language-local-name="Upper Sorbian" class="interlanguage-link-target"><span>Hornjoserbsce</span></a></li><li class="interlanguage-link interwiki-ky mw-list-item"><a href="https://ky.wiktionary.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:string/encode_entities" title="Модуль:string/encode entities – Kyrgyz" lang="ky" hreflang="ky" data-title="Модуль:string/encode entities" data-language-autonym="Кыргызча" data-language-local-name="Kyrgyz" class="interlanguage-link-target"><span>Кыргызча</span></a></li><li class="interlanguage-link interwiki-mt mw-list-item"><a href="https://mt.wiktionary.org/wiki/Module:string/encode_entities" title="Module:string/encode entities – Maltese" lang="mt" hreflang="mt" data-title="Module:string/encode entities" data-language-autonym="Malti" data-language-local-name="Maltese" class="interlanguage-link-target"><span>Malti</span></a></li><li class="interlanguage-link interwiki-mnw mw-list-item"><a href="https://mnw.wiktionary.org/wiki/%E1%80%99%E1%80%9D%E1%80%BA%E1%80%82%E1%80%BB%E1%80%B0:string/encode_entities" title="မဝ်ဂျူ:string/encode entities – Mon" lang="mnw" hreflang="mnw" data-title="မဝ်ဂျူ:string/encode entities" data-language-autonym="ဘာသာမန်" data-language-local-name="Mon" class="interlanguage-link-target"><span>ဘာသာမန်</span></a></li><li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://ms.wiktionary.org/wiki/Modul:string/encode_entities" title="Modul:string/encode entities – Malay" lang="ms" hreflang="ms" data-title="Modul:string/encode entities" data-language-autonym="Bahasa Melayu" data-language-local-name="Malay" class="interlanguage-link-target"><span>Bahasa Melayu</span></a></li><li class="interlanguage-link interwiki-mn mw-list-item"><a href="https://mn.wiktionary.org/wiki/Module:string/encode_entities" title="Module:string/encode entities – Mongolian" lang="mn" hreflang="mn" data-title="Module:string/encode entities" data-language-autonym="Монгол" data-language-local-name="Mongolian" class="interlanguage-link-target"><span>Монгол</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wiktionary.org/wiki/%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:string/encode_entities" title="モジュール:string/encode entities – Japanese" lang="ja" hreflang="ja" data-title="モジュール:string/encode entities" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-pa mw-list-item"><a href="https://pa.wiktionary.org/wiki/%E0%A8%AE%E0%A9%8C%E0%A8%A1%E0%A8%BF%E0%A8%8A%E0%A8%B2:string/encode_entities" title="ਮੌਡਿਊਲ:string/encode entities – Punjabi" lang="pa" hreflang="pa" data-title="ਮੌਡਿਊਲ:string/encode entities" data-language-autonym="ਪੰਜਾਬੀ" data-language-local-name="Punjabi" class="interlanguage-link-target"><span>ਪੰਜਾਬੀ</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wiktionary.org/wiki/M%C3%B3dulo:string/encode_entities" title="Módulo:string/encode entities – Portuguese" lang="pt" hreflang="pt" data-title="Módulo:string/encode entities" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ckb mw-list-item"><a href="https://ckb.wiktionary.org/wiki/%D9%85%DB%86%D8%AF%DB%8C%D9%88%D9%88%D9%84:string/encode_entities" title="مۆدیوول:string/encode entities – Central Kurdish" lang="ckb" hreflang="ckb" data-title="مۆدیوول:string/encode entities" data-language-autonym="کوردی" data-language-local-name="Central Kurdish" class="interlanguage-link-target"><span>کوردی</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wiktionary.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB:string/encode_entities" title="Модул:string/encode entities – Serbian" lang="sr" hreflang="sr" data-title="Модул:string/encode entities" data-language-autonym="Српски / srpski" data-language-local-name="Serbian" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-shn mw-list-item"><a href="https://shn.wiktionary.org/wiki/%E1%80%99%E1%80%B1%E1%82%83%E1%82%87%E1%81%B5%E1%80%BB%E1%80%B0%E1%80%B8:string/encode_entities" title="မေႃႇၵျူး:string/encode entities – Shan" lang="shn" hreflang="shn" data-title="မေႃႇၵျူး:string/encode entities" data-language-autonym="ၽႃႇသႃႇတႆး " data-language-local-name="Shan" class="interlanguage-link-target"><span>ၽႃႇသႃႇတႆး </span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wiktionary.org/wiki/%E0%B8%A1%E0%B8%AD%E0%B8%94%E0%B8%B9%E0%B8%A5:string/encode_entities" title="มอดูล:string/encode entities – Thai" lang="th" hreflang="th" data-title="มอดูล:string/encode entities" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wiktionary.org/wiki/M%C3%B4_%C4%91un:string/encode_entities" title="Mô đun:string/encode entities – Vietnamese" lang="vi" hreflang="vi" data-title="Mô đun:string/encode entities" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q125377784#sitelinks-wiktionary" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </nav> </div> </div> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 12 April 2024, at 12:39.</li> <li id="footer-info-copyright">Definitions and other text are available under the <a rel="nofollow" class="external text" href="//creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike License</a>; additional terms may apply. By using this site, you agree to the <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">Terms of Use</a> and <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy Policy.</a></li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wiktionary:About">About Wiktionary</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wiktionary:General_disclaimer">Disclaimers</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wiktionary.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wiktionary.org/w/index.php?title=Module:string/encode_entities&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> <script>(RLQ=window.RLQ||[]).push(function(){mw.log.warn("This page is using the deprecated ResourceLoader module \"codex-search-styles\".\n[1.43] Use a CodexModule with codexComponents to set your specific components used: https://www.mediawiki.org/wiki/Codex#Using_a_limited_subset_of_components");mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-rxt7p","wgBackendResponseTime":184,"wgPageParseReport":{"limitreport":{"cputime":"0.041","walltime":"0.055","ppvisitednodes":{"value":12,"limit":1000000},"postexpandincludesize":{"value":2110,"limit":2097152},"templateargumentsize":{"value":0,"limit":2097152},"expansiondepth":{"value":3,"limit":100},"expensivefunctioncount":{"value":2,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":0,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 46.815 1 Template:documentation","100.00% 46.815 1 -total"]},"scribunto":{"limitreport-timeusage":{"value":"0.021","limit":"10.000"},"limitreport-memusage":{"value":947086,"limit":104857600}},"cachereport":{"origin":"mw-web.codfw.main-f69cdc8f6-rxt7p","timestamp":"20241124132932","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>