formatting.php 289 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955
  1. <?php
  2. /**
  3. * Main WordPress Formatting API.
  4. *
  5. * Handles many functions for formatting output.
  6. *
  7. * @package WordPress
  8. */
  9. /**
  10. * Replaces common plain text characters into formatted entities
  11. *
  12. * As an example,
  13. *
  14. * 'cause today's effort makes it worth tomorrow's "holiday" ...
  15. *
  16. * Becomes:
  17. *
  18. * &#8217;cause today&#8217;s effort makes it worth tomorrow&#8217;s &#8220;holiday&#8221; &#8230;
  19. *
  20. * Code within certain html blocks are skipped.
  21. *
  22. * Do not use this function before the {@see 'init'} action hook; everything will break.
  23. *
  24. * @since 0.71
  25. *
  26. * @global array $wp_cockneyreplace Array of formatted entities for certain common phrases
  27. * @global array $shortcode_tags
  28. * @staticvar array $static_characters
  29. * @staticvar array $static_replacements
  30. * @staticvar array $dynamic_characters
  31. * @staticvar array $dynamic_replacements
  32. * @staticvar array $default_no_texturize_tags
  33. * @staticvar array $default_no_texturize_shortcodes
  34. * @staticvar bool $run_texturize
  35. * @staticvar string $apos
  36. * @staticvar string $prime
  37. * @staticvar string $double_prime
  38. * @staticvar string $opening_quote
  39. * @staticvar string $closing_quote
  40. * @staticvar string $opening_single_quote
  41. * @staticvar string $closing_single_quote
  42. * @staticvar string $open_q_flag
  43. * @staticvar string $open_sq_flag
  44. * @staticvar string $apos_flag
  45. *
  46. * @param string $text The text to be formatted
  47. * @param bool $reset Set to true for unit testing. Translated patterns will reset.
  48. * @return string The string replaced with html entities
  49. */
  50. function wptexturize( $text, $reset = false ) {
  51. global $wp_cockneyreplace, $shortcode_tags;
  52. static $static_characters = null,
  53. $static_replacements = null,
  54. $dynamic_characters = null,
  55. $dynamic_replacements = null,
  56. $default_no_texturize_tags = null,
  57. $default_no_texturize_shortcodes = null,
  58. $run_texturize = true,
  59. $apos = null,
  60. $prime = null,
  61. $double_prime = null,
  62. $opening_quote = null,
  63. $closing_quote = null,
  64. $opening_single_quote = null,
  65. $closing_single_quote = null,
  66. $open_q_flag = '<!--oq-->',
  67. $open_sq_flag = '<!--osq-->',
  68. $apos_flag = '<!--apos-->';
  69. // If there's nothing to do, just stop.
  70. if ( empty( $text ) || false === $run_texturize ) {
  71. return $text;
  72. }
  73. // Set up static variables. Run once only.
  74. if ( $reset || ! isset( $static_characters ) ) {
  75. /**
  76. * Filters whether to skip running wptexturize().
  77. *
  78. * Passing false to the filter will effectively short-circuit wptexturize().
  79. * returning the original text passed to the function instead.
  80. *
  81. * The filter runs only once, the first time wptexturize() is called.
  82. *
  83. * @since 4.0.0
  84. *
  85. * @see wptexturize()
  86. *
  87. * @param bool $run_texturize Whether to short-circuit wptexturize().
  88. */
  89. $run_texturize = apply_filters( 'run_wptexturize', $run_texturize );
  90. if ( false === $run_texturize ) {
  91. return $text;
  92. }
  93. /* translators: Opening curly double quote. */
  94. $opening_quote = _x( '&#8220;', 'opening curly double quote' );
  95. /* translators: Closing curly double quote. */
  96. $closing_quote = _x( '&#8221;', 'closing curly double quote' );
  97. /* translators: Apostrophe, for example in 'cause or can't. */
  98. $apos = _x( '&#8217;', 'apostrophe' );
  99. /* translators: Prime, for example in 9' (nine feet). */
  100. $prime = _x( '&#8242;', 'prime' );
  101. /* translators: Double prime, for example in 9" (nine inches). */
  102. $double_prime = _x( '&#8243;', 'double prime' );
  103. /* translators: Opening curly single quote. */
  104. $opening_single_quote = _x( '&#8216;', 'opening curly single quote' );
  105. /* translators: Closing curly single quote. */
  106. $closing_single_quote = _x( '&#8217;', 'closing curly single quote' );
  107. /* translators: En dash. */
  108. $en_dash = _x( '&#8211;', 'en dash' );
  109. /* translators: Em dash. */
  110. $em_dash = _x( '&#8212;', 'em dash' );
  111. $default_no_texturize_tags = array( 'pre', 'code', 'kbd', 'style', 'script', 'tt' );
  112. $default_no_texturize_shortcodes = array( 'code' );
  113. // if a plugin has provided an autocorrect array, use it
  114. if ( isset( $wp_cockneyreplace ) ) {
  115. $cockney = array_keys( $wp_cockneyreplace );
  116. $cockneyreplace = array_values( $wp_cockneyreplace );
  117. } else {
  118. /*
  119. * translators: This is a comma-separated list of words that defy the syntax of quotations in normal use,
  120. * for example... 'We do not have enough words yet' ... is a typical quoted phrase. But when we write
  121. * lines of code 'til we have enough of 'em, then we need to insert apostrophes instead of quotes.
  122. */
  123. $cockney = explode(
  124. ',',
  125. _x(
  126. "'tain't,'twere,'twas,'tis,'twill,'til,'bout,'nuff,'round,'cause,'em",
  127. 'Comma-separated list of words to texturize in your language'
  128. )
  129. );
  130. $cockneyreplace = explode(
  131. ',',
  132. _x(
  133. '&#8217;tain&#8217;t,&#8217;twere,&#8217;twas,&#8217;tis,&#8217;twill,&#8217;til,&#8217;bout,&#8217;nuff,&#8217;round,&#8217;cause,&#8217;em',
  134. 'Comma-separated list of replacement words in your language'
  135. )
  136. );
  137. }
  138. $static_characters = array_merge( array( '...', '``', '\'\'', ' (tm)' ), $cockney );
  139. $static_replacements = array_merge( array( '&#8230;', $opening_quote, $closing_quote, ' &#8482;' ), $cockneyreplace );
  140. // Pattern-based replacements of characters.
  141. // Sort the remaining patterns into several arrays for performance tuning.
  142. $dynamic_characters = array(
  143. 'apos' => array(),
  144. 'quote' => array(),
  145. 'dash' => array(),
  146. );
  147. $dynamic_replacements = array(
  148. 'apos' => array(),
  149. 'quote' => array(),
  150. 'dash' => array(),
  151. );
  152. $dynamic = array();
  153. $spaces = wp_spaces_regexp();
  154. // '99' and '99" are ambiguous among other patterns; assume it's an abbreviated year at the end of a quotation.
  155. if ( "'" !== $apos || "'" !== $closing_single_quote ) {
  156. $dynamic[ '/\'(\d\d)\'(?=\Z|[.,:;!?)}\-\]]|&gt;|' . $spaces . ')/' ] = $apos_flag . '$1' . $closing_single_quote;
  157. }
  158. if ( "'" !== $apos || '"' !== $closing_quote ) {
  159. $dynamic[ '/\'(\d\d)"(?=\Z|[.,:;!?)}\-\]]|&gt;|' . $spaces . ')/' ] = $apos_flag . '$1' . $closing_quote;
  160. }
  161. // '99 '99s '99's (apostrophe) But never '9 or '99% or '999 or '99.0.
  162. if ( "'" !== $apos ) {
  163. $dynamic['/\'(?=\d\d(?:\Z|(?![%\d]|[.,]\d)))/'] = $apos_flag;
  164. }
  165. // Quoted Numbers like '0.42'
  166. if ( "'" !== $opening_single_quote && "'" !== $closing_single_quote ) {
  167. $dynamic[ '/(?<=\A|' . $spaces . ')\'(\d[.,\d]*)\'/' ] = $open_sq_flag . '$1' . $closing_single_quote;
  168. }
  169. // Single quote at start, or preceded by (, {, <, [, ", -, or spaces.
  170. if ( "'" !== $opening_single_quote ) {
  171. $dynamic[ '/(?<=\A|[([{"\-]|&lt;|' . $spaces . ')\'/' ] = $open_sq_flag;
  172. }
  173. // Apostrophe in a word. No spaces, double apostrophes, or other punctuation.
  174. if ( "'" !== $apos ) {
  175. $dynamic[ '/(?<!' . $spaces . ')\'(?!\Z|[.,:;!?"\'(){}[\]\-]|&[lg]t;|' . $spaces . ')/' ] = $apos_flag;
  176. }
  177. $dynamic_characters['apos'] = array_keys( $dynamic );
  178. $dynamic_replacements['apos'] = array_values( $dynamic );
  179. $dynamic = array();
  180. // Quoted Numbers like "42"
  181. if ( '"' !== $opening_quote && '"' !== $closing_quote ) {
  182. $dynamic[ '/(?<=\A|' . $spaces . ')"(\d[.,\d]*)"/' ] = $open_q_flag . '$1' . $closing_quote;
  183. }
  184. // Double quote at start, or preceded by (, {, <, [, -, or spaces, and not followed by spaces.
  185. if ( '"' !== $opening_quote ) {
  186. $dynamic[ '/(?<=\A|[([{\-]|&lt;|' . $spaces . ')"(?!' . $spaces . ')/' ] = $open_q_flag;
  187. }
  188. $dynamic_characters['quote'] = array_keys( $dynamic );
  189. $dynamic_replacements['quote'] = array_values( $dynamic );
  190. $dynamic = array();
  191. // Dashes and spaces
  192. $dynamic['/---/'] = $em_dash;
  193. $dynamic[ '/(?<=^|' . $spaces . ')--(?=$|' . $spaces . ')/' ] = $em_dash;
  194. $dynamic['/(?<!xn)--/'] = $en_dash;
  195. $dynamic[ '/(?<=^|' . $spaces . ')-(?=$|' . $spaces . ')/' ] = $en_dash;
  196. $dynamic_characters['dash'] = array_keys( $dynamic );
  197. $dynamic_replacements['dash'] = array_values( $dynamic );
  198. }
  199. // Must do this every time in case plugins use these filters in a context sensitive manner
  200. /**
  201. * Filters the list of HTML elements not to texturize.
  202. *
  203. * @since 2.8.0
  204. *
  205. * @param array $default_no_texturize_tags An array of HTML element names.
  206. */
  207. $no_texturize_tags = apply_filters( 'no_texturize_tags', $default_no_texturize_tags );
  208. /**
  209. * Filters the list of shortcodes not to texturize.
  210. *
  211. * @since 2.8.0
  212. *
  213. * @param array $default_no_texturize_shortcodes An array of shortcode names.
  214. */
  215. $no_texturize_shortcodes = apply_filters( 'no_texturize_shortcodes', $default_no_texturize_shortcodes );
  216. $no_texturize_tags_stack = array();
  217. $no_texturize_shortcodes_stack = array();
  218. // Look for shortcodes and HTML elements.
  219. preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20=]++)@', $text, $matches );
  220. $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
  221. $found_shortcodes = ! empty( $tagnames );
  222. $shortcode_regex = $found_shortcodes ? _get_wptexturize_shortcode_regex( $tagnames ) : '';
  223. $regex = _get_wptexturize_split_regex( $shortcode_regex );
  224. $textarr = preg_split( $regex, $text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );
  225. foreach ( $textarr as &$curl ) {
  226. // Only call _wptexturize_pushpop_element if $curl is a delimiter.
  227. $first = $curl[0];
  228. if ( '<' === $first ) {
  229. if ( '<!--' === substr( $curl, 0, 4 ) ) {
  230. // This is an HTML comment delimiter.
  231. continue;
  232. } else {
  233. // This is an HTML element delimiter.
  234. // Replace each & with &#038; unless it already looks like an entity.
  235. $curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&#038;', $curl );
  236. _wptexturize_pushpop_element( $curl, $no_texturize_tags_stack, $no_texturize_tags );
  237. }
  238. } elseif ( '' === trim( $curl ) ) {
  239. // This is a newline between delimiters. Performance improves when we check this.
  240. continue;
  241. } elseif ( '[' === $first && $found_shortcodes && 1 === preg_match( '/^' . $shortcode_regex . '$/', $curl ) ) {
  242. // This is a shortcode delimiter.
  243. if ( '[[' !== substr( $curl, 0, 2 ) && ']]' !== substr( $curl, -2 ) ) {
  244. // Looks like a normal shortcode.
  245. _wptexturize_pushpop_element( $curl, $no_texturize_shortcodes_stack, $no_texturize_shortcodes );
  246. } else {
  247. // Looks like an escaped shortcode.
  248. continue;
  249. }
  250. } elseif ( empty( $no_texturize_shortcodes_stack ) && empty( $no_texturize_tags_stack ) ) {
  251. // This is neither a delimiter, nor is this content inside of no_texturize pairs. Do texturize.
  252. $curl = str_replace( $static_characters, $static_replacements, $curl );
  253. if ( false !== strpos( $curl, "'" ) ) {
  254. $curl = preg_replace( $dynamic_characters['apos'], $dynamic_replacements['apos'], $curl );
  255. $curl = wptexturize_primes( $curl, "'", $prime, $open_sq_flag, $closing_single_quote );
  256. $curl = str_replace( $apos_flag, $apos, $curl );
  257. $curl = str_replace( $open_sq_flag, $opening_single_quote, $curl );
  258. }
  259. if ( false !== strpos( $curl, '"' ) ) {
  260. $curl = preg_replace( $dynamic_characters['quote'], $dynamic_replacements['quote'], $curl );
  261. $curl = wptexturize_primes( $curl, '"', $double_prime, $open_q_flag, $closing_quote );
  262. $curl = str_replace( $open_q_flag, $opening_quote, $curl );
  263. }
  264. if ( false !== strpos( $curl, '-' ) ) {
  265. $curl = preg_replace( $dynamic_characters['dash'], $dynamic_replacements['dash'], $curl );
  266. }
  267. // 9x9 (times), but never 0x9999
  268. if ( 1 === preg_match( '/(?<=\d)x\d/', $curl ) ) {
  269. // Searching for a digit is 10 times more expensive than for the x, so we avoid doing this one!
  270. $curl = preg_replace( '/\b(\d(?(?<=0)[\d\.,]+|[\d\.,]*))x(\d[\d\.,]*)\b/', '$1&#215;$2', $curl );
  271. }
  272. // Replace each & with &#038; unless it already looks like an entity.
  273. $curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&#038;', $curl );
  274. }
  275. }
  276. return implode( '', $textarr );
  277. }
  278. /**
  279. * Implements a logic tree to determine whether or not "7'." represents seven feet,
  280. * then converts the special char into either a prime char or a closing quote char.
  281. *
  282. * @since 4.3.0
  283. *
  284. * @param string $haystack The plain text to be searched.
  285. * @param string $needle The character to search for such as ' or ".
  286. * @param string $prime The prime char to use for replacement.
  287. * @param string $open_quote The opening quote char. Opening quote replacement must be
  288. * accomplished already.
  289. * @param string $close_quote The closing quote char to use for replacement.
  290. * @return string The $haystack value after primes and quotes replacements.
  291. */
  292. function wptexturize_primes( $haystack, $needle, $prime, $open_quote, $close_quote ) {
  293. $spaces = wp_spaces_regexp();
  294. $flag = '<!--wp-prime-or-quote-->';
  295. $quote_pattern = "/$needle(?=\\Z|[.,:;!?)}\\-\\]]|&gt;|" . $spaces . ')/';
  296. $prime_pattern = "/(?<=\\d)$needle/";
  297. $flag_after_digit = "/(?<=\\d)$flag/";
  298. $flag_no_digit = "/(?<!\\d)$flag/";
  299. $sentences = explode( $open_quote, $haystack );
  300. foreach ( $sentences as $key => &$sentence ) {
  301. if ( false === strpos( $sentence, $needle ) ) {
  302. continue;
  303. } elseif ( 0 !== $key && 0 === substr_count( $sentence, $close_quote ) ) {
  304. $sentence = preg_replace( $quote_pattern, $flag, $sentence, -1, $count );
  305. if ( $count > 1 ) {
  306. // This sentence appears to have multiple closing quotes. Attempt Vulcan logic.
  307. $sentence = preg_replace( $flag_no_digit, $close_quote, $sentence, -1, $count2 );
  308. if ( 0 === $count2 ) {
  309. // Try looking for a quote followed by a period.
  310. $count2 = substr_count( $sentence, "$flag." );
  311. if ( $count2 > 0 ) {
  312. // Assume the rightmost quote-period match is the end of quotation.
  313. $pos = strrpos( $sentence, "$flag." );
  314. } else {
  315. // When all else fails, make the rightmost candidate a closing quote.
  316. // This is most likely to be problematic in the context of bug #18549.
  317. $pos = strrpos( $sentence, $flag );
  318. }
  319. $sentence = substr_replace( $sentence, $close_quote, $pos, strlen( $flag ) );
  320. }
  321. // Use conventional replacement on any remaining primes and quotes.
  322. $sentence = preg_replace( $prime_pattern, $prime, $sentence );
  323. $sentence = preg_replace( $flag_after_digit, $prime, $sentence );
  324. $sentence = str_replace( $flag, $close_quote, $sentence );
  325. } elseif ( 1 == $count ) {
  326. // Found only one closing quote candidate, so give it priority over primes.
  327. $sentence = str_replace( $flag, $close_quote, $sentence );
  328. $sentence = preg_replace( $prime_pattern, $prime, $sentence );
  329. } else {
  330. // No closing quotes found. Just run primes pattern.
  331. $sentence = preg_replace( $prime_pattern, $prime, $sentence );
  332. }
  333. } else {
  334. $sentence = preg_replace( $prime_pattern, $prime, $sentence );
  335. $sentence = preg_replace( $quote_pattern, $close_quote, $sentence );
  336. }
  337. if ( '"' == $needle && false !== strpos( $sentence, '"' ) ) {
  338. $sentence = str_replace( '"', $close_quote, $sentence );
  339. }
  340. }
  341. return implode( $open_quote, $sentences );
  342. }
  343. /**
  344. * Search for disabled element tags. Push element to stack on tag open and pop
  345. * on tag close.
  346. *
  347. * Assumes first char of $text is tag opening and last char is tag closing.
  348. * Assumes second char of $text is optionally '/' to indicate closing as in </html>.
  349. *
  350. * @since 2.9.0
  351. * @access private
  352. *
  353. * @param string $text Text to check. Must be a tag like `<html>` or `[shortcode]`.
  354. * @param array $stack List of open tag elements.
  355. * @param array $disabled_elements The tag names to match against. Spaces are not allowed in tag names.
  356. */
  357. function _wptexturize_pushpop_element( $text, &$stack, $disabled_elements ) {
  358. // Is it an opening tag or closing tag?
  359. if ( isset( $text[1] ) && '/' !== $text[1] ) {
  360. $opening_tag = true;
  361. $name_offset = 1;
  362. } elseif ( 0 == count( $stack ) ) {
  363. // Stack is empty. Just stop.
  364. return;
  365. } else {
  366. $opening_tag = false;
  367. $name_offset = 2;
  368. }
  369. // Parse out the tag name.
  370. $space = strpos( $text, ' ' );
  371. if ( false === $space ) {
  372. $space = -1;
  373. } else {
  374. $space -= $name_offset;
  375. }
  376. $tag = substr( $text, $name_offset, $space );
  377. // Handle disabled tags.
  378. if ( in_array( $tag, $disabled_elements ) ) {
  379. if ( $opening_tag ) {
  380. /*
  381. * This disables texturize until we find a closing tag of our type
  382. * (e.g. <pre>) even if there was invalid nesting before that
  383. *
  384. * Example: in the case <pre>sadsadasd</code>"baba"</pre>
  385. * "baba" won't be texturize
  386. */
  387. array_push( $stack, $tag );
  388. } elseif ( end( $stack ) == $tag ) {
  389. array_pop( $stack );
  390. }
  391. }
  392. }
  393. /**
  394. * Replaces double line-breaks with paragraph elements.
  395. *
  396. * A group of regex replaces used to identify text formatted with newlines and
  397. * replace double line-breaks with HTML paragraph tags. The remaining line-breaks
  398. * after conversion become <<br />> tags, unless $br is set to '0' or 'false'.
  399. *
  400. * @since 0.71
  401. *
  402. * @param string $pee The text which has to be formatted.
  403. * @param bool $br Optional. If set, this will convert all remaining line-breaks
  404. * after paragraphing. Default true.
  405. * @return string Text which has been converted into correct paragraph tags.
  406. */
  407. function wpautop( $pee, $br = true ) {
  408. $pre_tags = array();
  409. if ( trim( $pee ) === '' ) {
  410. return '';
  411. }
  412. // Just to make things a little easier, pad the end.
  413. $pee = $pee . "\n";
  414. /*
  415. * Pre tags shouldn't be touched by autop.
  416. * Replace pre tags with placeholders and bring them back after autop.
  417. */
  418. if ( strpos( $pee, '<pre' ) !== false ) {
  419. $pee_parts = explode( '</pre>', $pee );
  420. $last_pee = array_pop( $pee_parts );
  421. $pee = '';
  422. $i = 0;
  423. foreach ( $pee_parts as $pee_part ) {
  424. $start = strpos( $pee_part, '<pre' );
  425. // Malformed html?
  426. if ( $start === false ) {
  427. $pee .= $pee_part;
  428. continue;
  429. }
  430. $name = "<pre wp-pre-tag-$i></pre>";
  431. $pre_tags[ $name ] = substr( $pee_part, $start ) . '</pre>';
  432. $pee .= substr( $pee_part, 0, $start ) . $name;
  433. $i++;
  434. }
  435. $pee .= $last_pee;
  436. }
  437. // Change multiple <br>s into two line breaks, which will turn into paragraphs.
  438. $pee = preg_replace( '|<br\s*/?>\s*<br\s*/?>|', "\n\n", $pee );
  439. $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';
  440. // Add a double line break above block-level opening tags.
  441. $pee = preg_replace( '!(<' . $allblocks . '[\s/>])!', "\n\n$1", $pee );
  442. // Add a double line break below block-level closing tags.
  443. $pee = preg_replace( '!(</' . $allblocks . '>)!', "$1\n\n", $pee );
  444. // Add a double line break after hr tags, which are self closing.
  445. $pee = preg_replace( '!(<hr\s*?/?>)!', "$1\n\n", $pee );
  446. // Standardize newline characters to "\n".
  447. $pee = str_replace( array( "\r\n", "\r" ), "\n", $pee );
  448. // Find newlines in all elements and add placeholders.
  449. $pee = wp_replace_in_html_tags( $pee, array( "\n" => ' <!-- wpnl --> ' ) );
  450. // Collapse line breaks before and after <option> elements so they don't get autop'd.
  451. if ( strpos( $pee, '<option' ) !== false ) {
  452. $pee = preg_replace( '|\s*<option|', '<option', $pee );
  453. $pee = preg_replace( '|</option>\s*|', '</option>', $pee );
  454. }
  455. /*
  456. * Collapse line breaks inside <object> elements, before <param> and <embed> elements
  457. * so they don't get autop'd.
  458. */
  459. if ( strpos( $pee, '</object>' ) !== false ) {
  460. $pee = preg_replace( '|(<object[^>]*>)\s*|', '$1', $pee );
  461. $pee = preg_replace( '|\s*</object>|', '</object>', $pee );
  462. $pee = preg_replace( '%\s*(</?(?:param|embed)[^>]*>)\s*%', '$1', $pee );
  463. }
  464. /*
  465. * Collapse line breaks inside <audio> and <video> elements,
  466. * before and after <source> and <track> elements.
  467. */
  468. if ( strpos( $pee, '<source' ) !== false || strpos( $pee, '<track' ) !== false ) {
  469. $pee = preg_replace( '%([<\[](?:audio|video)[^>\]]*[>\]])\s*%', '$1', $pee );
  470. $pee = preg_replace( '%\s*([<\[]/(?:audio|video)[>\]])%', '$1', $pee );
  471. $pee = preg_replace( '%\s*(<(?:source|track)[^>]*>)\s*%', '$1', $pee );
  472. }
  473. // Collapse line breaks before and after <figcaption> elements.
  474. if ( strpos( $pee, '<figcaption' ) !== false ) {
  475. $pee = preg_replace( '|\s*(<figcaption[^>]*>)|', '$1', $pee );
  476. $pee = preg_replace( '|</figcaption>\s*|', '</figcaption>', $pee );
  477. }
  478. // Remove more than two contiguous line breaks.
  479. $pee = preg_replace( "/\n\n+/", "\n\n", $pee );
  480. // Split up the contents into an array of strings, separated by double line breaks.
  481. $pees = preg_split( '/\n\s*\n/', $pee, -1, PREG_SPLIT_NO_EMPTY );
  482. // Reset $pee prior to rebuilding.
  483. $pee = '';
  484. // Rebuild the content as a string, wrapping every bit with a <p>.
  485. foreach ( $pees as $tinkle ) {
  486. $pee .= '<p>' . trim( $tinkle, "\n" ) . "</p>\n";
  487. }
  488. // Under certain strange conditions it could create a P of entirely whitespace.
  489. $pee = preg_replace( '|<p>\s*</p>|', '', $pee );
  490. // Add a closing <p> inside <div>, <address>, or <form> tag if missing.
  491. $pee = preg_replace( '!<p>([^<]+)</(div|address|form)>!', '<p>$1</p></$2>', $pee );
  492. // If an opening or closing block element tag is wrapped in a <p>, unwrap it.
  493. $pee = preg_replace( '!<p>\s*(</?' . $allblocks . '[^>]*>)\s*</p>!', '$1', $pee );
  494. // In some cases <li> may get wrapped in <p>, fix them.
  495. $pee = preg_replace( '|<p>(<li.+?)</p>|', '$1', $pee );
  496. // If a <blockquote> is wrapped with a <p>, move it inside the <blockquote>.
  497. $pee = preg_replace( '|<p><blockquote([^>]*)>|i', '<blockquote$1><p>', $pee );
  498. $pee = str_replace( '</blockquote></p>', '</p></blockquote>', $pee );
  499. // If an opening or closing block element tag is preceded by an opening <p> tag, remove it.
  500. $pee = preg_replace( '!<p>\s*(</?' . $allblocks . '[^>]*>)!', '$1', $pee );
  501. // If an opening or closing block element tag is followed by a closing <p> tag, remove it.
  502. $pee = preg_replace( '!(</?' . $allblocks . '[^>]*>)\s*</p>!', '$1', $pee );
  503. // Optionally insert line breaks.
  504. if ( $br ) {
  505. // Replace newlines that shouldn't be touched with a placeholder.
  506. $pee = preg_replace_callback( '/<(script|style|svg).*?<\/\\1>/s', '_autop_newline_preservation_helper', $pee );
  507. // Normalize <br>
  508. $pee = str_replace( array( '<br>', '<br/>' ), '<br />', $pee );
  509. // Replace any new line characters that aren't preceded by a <br /> with a <br />.
  510. $pee = preg_replace( '|(?<!<br />)\s*\n|', "<br />\n", $pee );
  511. // Replace newline placeholders with newlines.
  512. $pee = str_replace( '<WPPreserveNewline />', "\n", $pee );
  513. }
  514. // If a <br /> tag is after an opening or closing block tag, remove it.
  515. $pee = preg_replace( '!(</?' . $allblocks . '[^>]*>)\s*<br />!', '$1', $pee );
  516. // If a <br /> tag is before a subset of opening or closing block tags, remove it.
  517. $pee = preg_replace( '!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee );
  518. $pee = preg_replace( "|\n</p>$|", '</p>', $pee );
  519. // Replace placeholder <pre> tags with their original content.
  520. if ( ! empty( $pre_tags ) ) {
  521. $pee = str_replace( array_keys( $pre_tags ), array_values( $pre_tags ), $pee );
  522. }
  523. // Restore newlines in all elements.
  524. if ( false !== strpos( $pee, '<!-- wpnl -->' ) ) {
  525. $pee = str_replace( array( ' <!-- wpnl --> ', '<!-- wpnl -->' ), "\n", $pee );
  526. }
  527. return $pee;
  528. }
  529. /**
  530. * Separate HTML elements and comments from the text.
  531. *
  532. * @since 4.2.4
  533. *
  534. * @param string $input The text which has to be formatted.
  535. * @return array The formatted text.
  536. */
  537. function wp_html_split( $input ) {
  538. return preg_split( get_html_split_regex(), $input, -1, PREG_SPLIT_DELIM_CAPTURE );
  539. }
  540. /**
  541. * Retrieve the regular expression for an HTML element.
  542. *
  543. * @since 4.4.0
  544. *
  545. * @staticvar string $regex
  546. *
  547. * @return string The regular expression
  548. */
  549. function get_html_split_regex() {
  550. static $regex;
  551. if ( ! isset( $regex ) ) {
  552. // phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound -- don't remove regex indentation
  553. $comments =
  554. '!' // Start of comment, after the <.
  555. . '(?:' // Unroll the loop: Consume everything until --> is found.
  556. . '-(?!->)' // Dash not followed by end of comment.
  557. . '[^\-]*+' // Consume non-dashes.
  558. . ')*+' // Loop possessively.
  559. . '(?:-->)?'; // End of comment. If not found, match all input.
  560. $cdata =
  561. '!\[CDATA\[' // Start of comment, after the <.
  562. . '[^\]]*+' // Consume non-].
  563. . '(?:' // Unroll the loop: Consume everything until ]]> is found.
  564. . '](?!]>)' // One ] not followed by end of comment.
  565. . '[^\]]*+' // Consume non-].
  566. . ')*+' // Loop possessively.
  567. . '(?:]]>)?'; // End of comment. If not found, match all input.
  568. $escaped =
  569. '(?=' // Is the element escaped?
  570. . '!--'
  571. . '|'
  572. . '!\[CDATA\['
  573. . ')'
  574. . '(?(?=!-)' // If yes, which type?
  575. . $comments
  576. . '|'
  577. . $cdata
  578. . ')';
  579. $regex =
  580. '/(' // Capture the entire match.
  581. . '<' // Find start of element.
  582. . '(?' // Conditional expression follows.
  583. . $escaped // Find end of escaped element.
  584. . '|' // ... else ...
  585. . '[^>]*>?' // Find end of normal element.
  586. . ')'
  587. . ')/';
  588. // phpcs:enable
  589. }
  590. return $regex;
  591. }
  592. /**
  593. * Retrieve the combined regular expression for HTML and shortcodes.
  594. *
  595. * @access private
  596. * @ignore
  597. * @internal This function will be removed in 4.5.0 per Shortcode API Roadmap.
  598. * @since 4.4.0
  599. *
  600. * @staticvar string $html_regex
  601. *
  602. * @param string $shortcode_regex The result from _get_wptexturize_shortcode_regex(). Optional.
  603. * @return string The regular expression
  604. */
  605. function _get_wptexturize_split_regex( $shortcode_regex = '' ) {
  606. static $html_regex;
  607. if ( ! isset( $html_regex ) ) {
  608. // phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound -- don't remove regex indentation
  609. $comment_regex =
  610. '!' // Start of comment, after the <.
  611. . '(?:' // Unroll the loop: Consume everything until --> is found.
  612. . '-(?!->)' // Dash not followed by end of comment.
  613. . '[^\-]*+' // Consume non-dashes.
  614. . ')*+' // Loop possessively.
  615. . '(?:-->)?'; // End of comment. If not found, match all input.
  616. $html_regex = // Needs replaced with wp_html_split() per Shortcode API Roadmap.
  617. '<' // Find start of element.
  618. . '(?(?=!--)' // Is this a comment?
  619. . $comment_regex // Find end of comment.
  620. . '|'
  621. . '[^>]*>?' // Find end of element. If not found, match all input.
  622. . ')';
  623. // phpcs:enable
  624. }
  625. if ( empty( $shortcode_regex ) ) {
  626. $regex = '/(' . $html_regex . ')/';
  627. } else {
  628. $regex = '/(' . $html_regex . '|' . $shortcode_regex . ')/';
  629. }
  630. return $regex;
  631. }
  632. /**
  633. * Retrieve the regular expression for shortcodes.
  634. *
  635. * @access private
  636. * @ignore
  637. * @internal This function will be removed in 4.5.0 per Shortcode API Roadmap.
  638. * @since 4.4.0
  639. *
  640. * @param array $tagnames List of shortcodes to find.
  641. * @return string The regular expression
  642. */
  643. function _get_wptexturize_shortcode_regex( $tagnames ) {
  644. $tagregexp = join( '|', array_map( 'preg_quote', $tagnames ) );
  645. $tagregexp = "(?:$tagregexp)(?=[\\s\\]\\/])"; // Excerpt of get_shortcode_regex().
  646. // phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound -- don't remove regex indentation
  647. $regex =
  648. '\[' // Find start of shortcode.
  649. . '[\/\[]?' // Shortcodes may begin with [/ or [[
  650. . $tagregexp // Only match registered shortcodes, because performance.
  651. . '(?:'
  652. . '[^\[\]<>]+' // Shortcodes do not contain other shortcodes. Quantifier critical.
  653. . '|'
  654. . '<[^\[\]>]*>' // HTML elements permitted. Prevents matching ] before >.
  655. . ')*+' // Possessive critical.
  656. . '\]' // Find end of shortcode.
  657. . '\]?'; // Shortcodes may end with ]]
  658. // phpcs:enable
  659. return $regex;
  660. }
  661. /**
  662. * Replace characters or phrases within HTML elements only.
  663. *
  664. * @since 4.2.3
  665. *
  666. * @param string $haystack The text which has to be formatted.
  667. * @param array $replace_pairs In the form array('from' => 'to', ...).
  668. * @return string The formatted text.
  669. */
  670. function wp_replace_in_html_tags( $haystack, $replace_pairs ) {
  671. // Find all elements.
  672. $textarr = wp_html_split( $haystack );
  673. $changed = false;
  674. // Optimize when searching for one item.
  675. if ( 1 === count( $replace_pairs ) ) {
  676. // Extract $needle and $replace.
  677. foreach ( $replace_pairs as $needle => $replace ) {
  678. }
  679. // Loop through delimiters (elements) only.
  680. for ( $i = 1, $c = count( $textarr ); $i < $c; $i += 2 ) {
  681. if ( false !== strpos( $textarr[ $i ], $needle ) ) {
  682. $textarr[ $i ] = str_replace( $needle, $replace, $textarr[ $i ] );
  683. $changed = true;
  684. }
  685. }
  686. } else {
  687. // Extract all $needles.
  688. $needles = array_keys( $replace_pairs );
  689. // Loop through delimiters (elements) only.
  690. for ( $i = 1, $c = count( $textarr ); $i < $c; $i += 2 ) {
  691. foreach ( $needles as $needle ) {
  692. if ( false !== strpos( $textarr[ $i ], $needle ) ) {
  693. $textarr[ $i ] = strtr( $textarr[ $i ], $replace_pairs );
  694. $changed = true;
  695. // After one strtr() break out of the foreach loop and look at next element.
  696. break;
  697. }
  698. }
  699. }
  700. }
  701. if ( $changed ) {
  702. $haystack = implode( $textarr );
  703. }
  704. return $haystack;
  705. }
  706. /**
  707. * Newline preservation help function for wpautop
  708. *
  709. * @since 3.1.0
  710. * @access private
  711. *
  712. * @param array $matches preg_replace_callback matches array
  713. * @return string
  714. */
  715. function _autop_newline_preservation_helper( $matches ) {
  716. return str_replace( "\n", '<WPPreserveNewline />', $matches[0] );
  717. }
  718. /**
  719. * Don't auto-p wrap shortcodes that stand alone
  720. *
  721. * Ensures that shortcodes are not wrapped in `<p>...</p>`.
  722. *
  723. * @since 2.9.0
  724. *
  725. * @global array $shortcode_tags
  726. *
  727. * @param string $pee The content.
  728. * @return string The filtered content.
  729. */
  730. function shortcode_unautop( $pee ) {
  731. global $shortcode_tags;
  732. if ( empty( $shortcode_tags ) || ! is_array( $shortcode_tags ) ) {
  733. return $pee;
  734. }
  735. $tagregexp = join( '|', array_map( 'preg_quote', array_keys( $shortcode_tags ) ) );
  736. $spaces = wp_spaces_regexp();
  737. // phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound,WordPress.WhiteSpace.PrecisionAlignment.Found -- don't remove regex indentation
  738. $pattern =
  739. '/'
  740. . '<p>' // Opening paragraph
  741. . '(?:' . $spaces . ')*+' // Optional leading whitespace
  742. . '(' // 1: The shortcode
  743. . '\\[' // Opening bracket
  744. . "($tagregexp)" // 2: Shortcode name
  745. . '(?![\\w-])' // Not followed by word character or hyphen
  746. // Unroll the loop: Inside the opening shortcode tag
  747. . '[^\\]\\/]*' // Not a closing bracket or forward slash
  748. . '(?:'
  749. . '\\/(?!\\])' // A forward slash not followed by a closing bracket
  750. . '[^\\]\\/]*' // Not a closing bracket or forward slash
  751. . ')*?'
  752. . '(?:'
  753. . '\\/\\]' // Self closing tag and closing bracket
  754. . '|'
  755. . '\\]' // Closing bracket
  756. . '(?:' // Unroll the loop: Optionally, anything between the opening and closing shortcode tags
  757. . '[^\\[]*+' // Not an opening bracket
  758. . '(?:'
  759. . '\\[(?!\\/\\2\\])' // An opening bracket not followed by the closing shortcode tag
  760. . '[^\\[]*+' // Not an opening bracket
  761. . ')*+'
  762. . '\\[\\/\\2\\]' // Closing shortcode tag
  763. . ')?'
  764. . ')'
  765. . ')'
  766. . '(?:' . $spaces . ')*+' // optional trailing whitespace
  767. . '<\\/p>' // closing paragraph
  768. . '/';
  769. // phpcs:enable
  770. return preg_replace( $pattern, '$1', $pee );
  771. }
  772. /**
  773. * Checks to see if a string is utf8 encoded.
  774. *
  775. * NOTE: This function checks for 5-Byte sequences, UTF8
  776. * has Bytes Sequences with a maximum length of 4.
  777. *
  778. * @author bmorel at ssi dot fr (modified)
  779. * @since 1.2.1
  780. *
  781. * @param string $str The string to be checked
  782. * @return bool True if $str fits a UTF-8 model, false otherwise.
  783. */
  784. function seems_utf8( $str ) {
  785. mbstring_binary_safe_encoding();
  786. $length = strlen( $str );
  787. reset_mbstring_encoding();
  788. for ( $i = 0; $i < $length; $i++ ) {
  789. $c = ord( $str[ $i ] );
  790. if ( $c < 0x80 ) {
  791. $n = 0; // 0bbbbbbb
  792. } elseif ( ( $c & 0xE0 ) == 0xC0 ) {
  793. $n = 1; // 110bbbbb
  794. } elseif ( ( $c & 0xF0 ) == 0xE0 ) {
  795. $n = 2; // 1110bbbb
  796. } elseif ( ( $c & 0xF8 ) == 0xF0 ) {
  797. $n = 3; // 11110bbb
  798. } elseif ( ( $c & 0xFC ) == 0xF8 ) {
  799. $n = 4; // 111110bb
  800. } elseif ( ( $c & 0xFE ) == 0xFC ) {
  801. $n = 5; // 1111110b
  802. } else {
  803. return false; // Does not match any model
  804. }
  805. for ( $j = 0; $j < $n; $j++ ) { // n bytes matching 10bbbbbb follow ?
  806. if ( ( ++$i == $length ) || ( ( ord( $str[ $i ] ) & 0xC0 ) != 0x80 ) ) {
  807. return false;
  808. }
  809. }
  810. }
  811. return true;
  812. }
  813. /**
  814. * Converts a number of special characters into their HTML entities.
  815. *
  816. * Specifically deals with: &, <, >, ", and '.
  817. *
  818. * $quote_style can be set to ENT_COMPAT to encode " to
  819. * &quot;, or ENT_QUOTES to do both. Default is ENT_NOQUOTES where no quotes are encoded.
  820. *
  821. * @since 1.2.2
  822. * @access private
  823. *
  824. * @staticvar string $_charset
  825. *
  826. * @param string $string The text which is to be encoded.
  827. * @param int|string $quote_style Optional. Converts double quotes if set to ENT_COMPAT,
  828. * both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES.
  829. * Also compatible with old values; converting single quotes if set to 'single',
  830. * double if set to 'double' or both if otherwise set.
  831. * Default is ENT_NOQUOTES.
  832. * @param false|string $charset Optional. The character encoding of the string. Default is false.
  833. * @param bool $double_encode Optional. Whether to encode existing html entities. Default is false.
  834. * @return string The encoded text with HTML entities.
  835. */
  836. function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
  837. $string = (string) $string;
  838. if ( 0 === strlen( $string ) ) {
  839. return '';
  840. }
  841. // Don't bother if there are no specialchars - saves some processing
  842. if ( ! preg_match( '/[&<>"\']/', $string ) ) {
  843. return $string;
  844. }
  845. // Account for the previous behaviour of the function when the $quote_style is not an accepted value
  846. if ( empty( $quote_style ) ) {
  847. $quote_style = ENT_NOQUOTES;
  848. } elseif ( ! in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) {
  849. $quote_style = ENT_QUOTES;
  850. }
  851. // Store the site charset as a static to avoid multiple calls to wp_load_alloptions()
  852. if ( ! $charset ) {
  853. static $_charset = null;
  854. if ( ! isset( $_charset ) ) {
  855. $alloptions = wp_load_alloptions();
  856. $_charset = isset( $alloptions['blog_charset'] ) ? $alloptions['blog_charset'] : '';
  857. }
  858. $charset = $_charset;
  859. }
  860. if ( in_array( $charset, array( 'utf8', 'utf-8', 'UTF8' ) ) ) {
  861. $charset = 'UTF-8';
  862. }
  863. $_quote_style = $quote_style;
  864. if ( $quote_style === 'double' ) {
  865. $quote_style = ENT_COMPAT;
  866. $_quote_style = ENT_COMPAT;
  867. } elseif ( $quote_style === 'single' ) {
  868. $quote_style = ENT_NOQUOTES;
  869. }
  870. if ( ! $double_encode ) {
  871. // Guarantee every &entity; is valid, convert &garbage; into &amp;garbage;
  872. // This is required for PHP < 5.4.0 because ENT_HTML401 flag is unavailable.
  873. $string = wp_kses_normalize_entities( $string );
  874. }
  875. $string = htmlspecialchars( $string, $quote_style, $charset, $double_encode );
  876. // Back-compat.
  877. if ( 'single' === $_quote_style ) {
  878. $string = str_replace( "'", '&#039;', $string );
  879. }
  880. return $string;
  881. }
  882. /**
  883. * Converts a number of HTML entities into their special characters.
  884. *
  885. * Specifically deals with: &, <, >, ", and '.
  886. *
  887. * $quote_style can be set to ENT_COMPAT to decode " entities,
  888. * or ENT_QUOTES to do both " and '. Default is ENT_NOQUOTES where no quotes are decoded.
  889. *
  890. * @since 2.8.0
  891. *
  892. * @param string $string The text which is to be decoded.
  893. * @param string|int $quote_style Optional. Converts double quotes if set to ENT_COMPAT,
  894. * both single and double if set to ENT_QUOTES or
  895. * none if set to ENT_NOQUOTES.
  896. * Also compatible with old _wp_specialchars() values;
  897. * converting single quotes if set to 'single',
  898. * double if set to 'double' or both if otherwise set.
  899. * Default is ENT_NOQUOTES.
  900. * @return string The decoded text without HTML entities.
  901. */
  902. function wp_specialchars_decode( $string, $quote_style = ENT_NOQUOTES ) {
  903. $string = (string) $string;
  904. if ( 0 === strlen( $string ) ) {
  905. return '';
  906. }
  907. // Don't bother if there are no entities - saves a lot of processing
  908. if ( strpos( $string, '&' ) === false ) {
  909. return $string;
  910. }
  911. // Match the previous behaviour of _wp_specialchars() when the $quote_style is not an accepted value
  912. if ( empty( $quote_style ) ) {
  913. $quote_style = ENT_NOQUOTES;
  914. } elseif ( ! in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) {
  915. $quote_style = ENT_QUOTES;
  916. }
  917. // More complete than get_html_translation_table( HTML_SPECIALCHARS )
  918. $single = array(
  919. '&#039;' => '\'',
  920. '&#x27;' => '\'',
  921. );
  922. $single_preg = array(
  923. '/&#0*39;/' => '&#039;',
  924. '/&#x0*27;/i' => '&#x27;',
  925. );
  926. $double = array(
  927. '&quot;' => '"',
  928. '&#034;' => '"',
  929. '&#x22;' => '"',
  930. );
  931. $double_preg = array(
  932. '/&#0*34;/' => '&#034;',
  933. '/&#x0*22;/i' => '&#x22;',
  934. );
  935. $others = array(
  936. '&lt;' => '<',
  937. '&#060;' => '<',
  938. '&gt;' => '>',
  939. '&#062;' => '>',
  940. '&amp;' => '&',
  941. '&#038;' => '&',
  942. '&#x26;' => '&',
  943. );
  944. $others_preg = array(
  945. '/&#0*60;/' => '&#060;',
  946. '/&#0*62;/' => '&#062;',
  947. '/&#0*38;/' => '&#038;',
  948. '/&#x0*26;/i' => '&#x26;',
  949. );
  950. if ( $quote_style === ENT_QUOTES ) {
  951. $translation = array_merge( $single, $double, $others );
  952. $translation_preg = array_merge( $single_preg, $double_preg, $others_preg );
  953. } elseif ( $quote_style === ENT_COMPAT || $quote_style === 'double' ) {
  954. $translation = array_merge( $double, $others );
  955. $translation_preg = array_merge( $double_preg, $others_preg );
  956. } elseif ( $quote_style === 'single' ) {
  957. $translation = array_merge( $single, $others );
  958. $translation_preg = array_merge( $single_preg, $others_preg );
  959. } elseif ( $quote_style === ENT_NOQUOTES ) {
  960. $translation = $others;
  961. $translation_preg = $others_preg;
  962. }
  963. // Remove zero padding on numeric entities
  964. $string = preg_replace( array_keys( $translation_preg ), array_values( $translation_preg ), $string );
  965. // Replace characters according to translation table
  966. return strtr( $string, $translation );
  967. }
  968. /**
  969. * Checks for invalid UTF8 in a string.
  970. *
  971. * @since 2.8.0
  972. *
  973. * @staticvar bool $is_utf8
  974. * @staticvar bool $utf8_pcre
  975. *
  976. * @param string $string The text which is to be checked.
  977. * @param bool $strip Optional. Whether to attempt to strip out invalid UTF8. Default is false.
  978. * @return string The checked text.
  979. */
  980. function wp_check_invalid_utf8( $string, $strip = false ) {
  981. $string = (string) $string;
  982. if ( 0 === strlen( $string ) ) {
  983. return '';
  984. }
  985. // Store the site charset as a static to avoid multiple calls to get_option()
  986. static $is_utf8 = null;
  987. if ( ! isset( $is_utf8 ) ) {
  988. $is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) );
  989. }
  990. if ( ! $is_utf8 ) {
  991. return $string;
  992. }
  993. // Check for support for utf8 in the installed PCRE library once and store the result in a static
  994. static $utf8_pcre = null;
  995. if ( ! isset( $utf8_pcre ) ) {
  996. // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
  997. $utf8_pcre = @preg_match( '/^./u', 'a' );
  998. }
  999. // We can't demand utf8 in the PCRE installation, so just return the string in those cases
  1000. if ( ! $utf8_pcre ) {
  1001. return $string;
  1002. }
  1003. // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- preg_match fails when it encounters invalid UTF8 in $string
  1004. if ( 1 === @preg_match( '/^./us', $string ) ) {
  1005. return $string;
  1006. }
  1007. // Attempt to strip the bad chars if requested (not recommended)
  1008. if ( $strip && function_exists( 'iconv' ) ) {
  1009. return iconv( 'utf-8', 'utf-8', $string );
  1010. }
  1011. return '';
  1012. }
  1013. /**
  1014. * Encode the Unicode values to be used in the URI.
  1015. *
  1016. * @since 1.5.0
  1017. *
  1018. * @param string $utf8_string
  1019. * @param int $length Max length of the string
  1020. * @return string String with Unicode encoded for URI.
  1021. */
  1022. function utf8_uri_encode( $utf8_string, $length = 0 ) {
  1023. $unicode = '';
  1024. $values = array();
  1025. $num_octets = 1;
  1026. $unicode_length = 0;
  1027. mbstring_binary_safe_encoding();
  1028. $string_length = strlen( $utf8_string );
  1029. reset_mbstring_encoding();
  1030. for ( $i = 0; $i < $string_length; $i++ ) {
  1031. $value = ord( $utf8_string[ $i ] );
  1032. if ( $value < 128 ) {
  1033. if ( $length && ( $unicode_length >= $length ) ) {
  1034. break;
  1035. }
  1036. $unicode .= chr( $value );
  1037. $unicode_length++;
  1038. } else {
  1039. if ( count( $values ) == 0 ) {
  1040. if ( $value < 224 ) {
  1041. $num_octets = 2;
  1042. } elseif ( $value < 240 ) {
  1043. $num_octets = 3;
  1044. } else {
  1045. $num_octets = 4;
  1046. }
  1047. }
  1048. $values[] = $value;
  1049. if ( $length && ( $unicode_length + ( $num_octets * 3 ) ) > $length ) {
  1050. break;
  1051. }
  1052. if ( count( $values ) == $num_octets ) {
  1053. for ( $j = 0; $j < $num_octets; $j++ ) {
  1054. $unicode .= '%' . dechex( $values[ $j ] );
  1055. }
  1056. $unicode_length += $num_octets * 3;
  1057. $values = array();
  1058. $num_octets = 1;
  1059. }
  1060. }
  1061. }
  1062. return $unicode;
  1063. }
  1064. /**
  1065. * Converts all accent characters to ASCII characters.
  1066. *
  1067. * If there are no accent characters, then the string given is just returned.
  1068. *
  1069. * **Accent characters converted:**
  1070. *
  1071. * Currency signs:
  1072. *
  1073. * | Code | Glyph | Replacement | Description |
  1074. * | -------- | ----- | ----------- | ------------------- |
  1075. * | U+00A3 | £ | (empty) | British Pound sign |
  1076. * | U+20AC | € | E | Euro sign |
  1077. *
  1078. * Decompositions for Latin-1 Supplement:
  1079. *
  1080. * | Code | Glyph | Replacement | Description |
  1081. * | ------- | ----- | ----------- | -------------------------------------- |
  1082. * | U+00AA | ª | a | Feminine ordinal indicator |
  1083. * | U+00BA | º | o | Masculine ordinal indicator |
  1084. * | U+00C0 | À | A | Latin capital letter A with grave |
  1085. * | U+00C1 | Á | A | Latin capital letter A with acute |
  1086. * | U+00C2 | Â | A | Latin capital letter A with circumflex |
  1087. * | U+00C3 | Ã | A | Latin capital letter A with tilde |
  1088. * | U+00C4 | Ä | A | Latin capital letter A with diaeresis |
  1089. * | U+00C5 | Å | A | Latin capital letter A with ring above |
  1090. * | U+00C6 | Æ | AE | Latin capital letter AE |
  1091. * | U+00C7 | Ç | C | Latin capital letter C with cedilla |
  1092. * | U+00C8 | È | E | Latin capital letter E with grave |
  1093. * | U+00C9 | É | E | Latin capital letter E with acute |
  1094. * | U+00CA | Ê | E | Latin capital letter E with circumflex |
  1095. * | U+00CB | Ë | E | Latin capital letter E with diaeresis |
  1096. * | U+00CC | Ì | I | Latin capital letter I with grave |
  1097. * | U+00CD | Í | I | Latin capital letter I with acute |
  1098. * | U+00CE | Î | I | Latin capital letter I with circumflex |
  1099. * | U+00CF | Ï | I | Latin capital letter I with diaeresis |
  1100. * | U+00D0 | Ð | D | Latin capital letter Eth |
  1101. * | U+00D1 | Ñ | N | Latin capital letter N with tilde |
  1102. * | U+00D2 | Ò | O | Latin capital letter O with grave |
  1103. * | U+00D3 | Ó | O | Latin capital letter O with acute |
  1104. * | U+00D4 | Ô | O | Latin capital letter O with circumflex |
  1105. * | U+00D5 | Õ | O | Latin capital letter O with tilde |
  1106. * | U+00D6 | Ö | O | Latin capital letter O with diaeresis |
  1107. * | U+00D8 | Ø | O | Latin capital letter O with stroke |
  1108. * | U+00D9 | Ù | U | Latin capital letter U with grave |
  1109. * | U+00DA | Ú | U | Latin capital letter U with acute |
  1110. * | U+00DB | Û | U | Latin capital letter U with circumflex |
  1111. * | U+00DC | Ü | U | Latin capital letter U with diaeresis |
  1112. * | U+00DD | Ý | Y | Latin capital letter Y with acute |
  1113. * | U+00DE | Þ | TH | Latin capital letter Thorn |
  1114. * | U+00DF | ß | s | Latin small letter sharp s |
  1115. * | U+00E0 | à | a | Latin small letter a with grave |
  1116. * | U+00E1 | á | a | Latin small letter a with acute |
  1117. * | U+00E2 | â | a | Latin small letter a with circumflex |
  1118. * | U+00E3 | ã | a | Latin small letter a with tilde |
  1119. * | U+00E4 | ä | a | Latin small letter a with diaeresis |
  1120. * | U+00E5 | å | a | Latin small letter a with ring above |
  1121. * | U+00E6 | æ | ae | Latin small letter ae |
  1122. * | U+00E7 | ç | c | Latin small letter c with cedilla |
  1123. * | U+00E8 | è | e | Latin small letter e with grave |
  1124. * | U+00E9 | é | e | Latin small letter e with acute |
  1125. * | U+00EA | ê | e | Latin small letter e with circumflex |
  1126. * | U+00EB | ë | e | Latin small letter e with diaeresis |
  1127. * | U+00EC | ì | i | Latin small letter i with grave |
  1128. * | U+00ED | í | i | Latin small letter i with acute |
  1129. * | U+00EE | î | i | Latin small letter i with circumflex |
  1130. * | U+00EF | ï | i | Latin small letter i with diaeresis |
  1131. * | U+00F0 | ð | d | Latin small letter Eth |
  1132. * | U+00F1 | ñ | n | Latin small letter n with tilde |
  1133. * | U+00F2 | ò | o | Latin small letter o with grave |
  1134. * | U+00F3 | ó | o | Latin small letter o with acute |
  1135. * | U+00F4 | ô | o | Latin small letter o with circumflex |
  1136. * | U+00F5 | õ | o | Latin small letter o with tilde |
  1137. * | U+00F6 | ö | o | Latin small letter o with diaeresis |
  1138. * | U+00F8 | ø | o | Latin small letter o with stroke |
  1139. * | U+00F9 | ù | u | Latin small letter u with grave |
  1140. * | U+00FA | ú | u | Latin small letter u with acute |
  1141. * | U+00FB | û | u | Latin small letter u with circumflex |
  1142. * | U+00FC | ü | u | Latin small letter u with diaeresis |
  1143. * | U+00FD | ý | y | Latin small letter y with acute |
  1144. * | U+00FE | þ | th | Latin small letter Thorn |
  1145. * | U+00FF | ÿ | y | Latin small letter y with diaeresis |
  1146. *
  1147. * Decompositions for Latin Extended-A:
  1148. *
  1149. * | Code | Glyph | Replacement | Description |
  1150. * | ------- | ----- | ----------- | ------------------------------------------------- |
  1151. * | U+0100 | Ā | A | Latin capital letter A with macron |
  1152. * | U+0101 | ā | a | Latin small letter a with macron |
  1153. * | U+0102 | Ă | A | Latin capital letter A with breve |
  1154. * | U+0103 | ă | a | Latin small letter a with breve |
  1155. * | U+0104 | Ą | A | Latin capital letter A with ogonek |
  1156. * | U+0105 | ą | a | Latin small letter a with ogonek |
  1157. * | U+01006 | Ć | C | Latin capital letter C with acute |
  1158. * | U+0107 | ć | c | Latin small letter c with acute |
  1159. * | U+0108 | Ĉ | C | Latin capital letter C with circumflex |
  1160. * | U+0109 | ĉ | c | Latin small letter c with circumflex |
  1161. * | U+010A | Ċ | C | Latin capital letter C with dot above |
  1162. * | U+010B | ċ | c | Latin small letter c with dot above |
  1163. * | U+010C | Č | C | Latin capital letter C with caron |
  1164. * | U+010D | č | c | Latin small letter c with caron |
  1165. * | U+010E | Ď | D | Latin capital letter D with caron |
  1166. * | U+010F | ď | d | Latin small letter d with caron |
  1167. * | U+0110 | Đ | D | Latin capital letter D with stroke |
  1168. * | U+0111 | đ | d | Latin small letter d with stroke |
  1169. * | U+0112 | Ē | E | Latin capital letter E with macron |
  1170. * | U+0113 | ē | e | Latin small letter e with macron |
  1171. * | U+0114 | Ĕ | E | Latin capital letter E with breve |
  1172. * | U+0115 | ĕ | e | Latin small letter e with breve |
  1173. * | U+0116 | Ė | E | Latin capital letter E with dot above |
  1174. * | U+0117 | ė | e | Latin small letter e with dot above |
  1175. * | U+0118 | Ę | E | Latin capital letter E with ogonek |
  1176. * | U+0119 | ę | e | Latin small letter e with ogonek |
  1177. * | U+011A | Ě | E | Latin capital letter E with caron |
  1178. * | U+011B | ě | e | Latin small letter e with caron |
  1179. * | U+011C | Ĝ | G | Latin capital letter G with circumflex |
  1180. * | U+011D | ĝ | g | Latin small letter g with circumflex |
  1181. * | U+011E | Ğ | G | Latin capital letter G with breve |
  1182. * | U+011F | ğ | g | Latin small letter g with breve |
  1183. * | U+0120 | Ġ | G | Latin capital letter G with dot above |
  1184. * | U+0121 | ġ | g | Latin small letter g with dot above |
  1185. * | U+0122 | Ģ | G | Latin capital letter G with cedilla |
  1186. * | U+0123 | ģ | g | Latin small letter g with cedilla |
  1187. * | U+0124 | Ĥ | H | Latin capital letter H with circumflex |
  1188. * | U+0125 | ĥ | h | Latin small letter h with circumflex |
  1189. * | U+0126 | Ħ | H | Latin capital letter H with stroke |
  1190. * | U+0127 | ħ | h | Latin small letter h with stroke |
  1191. * | U+0128 | Ĩ | I | Latin capital letter I with tilde |
  1192. * | U+0129 | ĩ | i | Latin small letter i with tilde |
  1193. * | U+012A | Ī | I | Latin capital letter I with macron |
  1194. * | U+012B | ī | i | Latin small letter i with macron |
  1195. * | U+012C | Ĭ | I | Latin capital letter I with breve |
  1196. * | U+012D | ĭ | i | Latin small letter i with breve |
  1197. * | U+012E | Į | I | Latin capital letter I with ogonek |
  1198. * | U+012F | į | i | Latin small letter i with ogonek |
  1199. * | U+0130 | İ | I | Latin capital letter I with dot above |
  1200. * | U+0131 | ı | i | Latin small letter dotless i |
  1201. * | U+0132 | IJ | IJ | Latin capital ligature IJ |
  1202. * | U+0133 | ij | ij | Latin small ligature ij |
  1203. * | U+0134 | Ĵ | J | Latin capital letter J with circumflex |
  1204. * | U+0135 | ĵ | j | Latin small letter j with circumflex |
  1205. * | U+0136 | Ķ | K | Latin capital letter K with cedilla |
  1206. * | U+0137 | ķ | k | Latin small letter k with cedilla |
  1207. * | U+0138 | ĸ | k | Latin small letter Kra |
  1208. * | U+0139 | Ĺ | L | Latin capital letter L with acute |
  1209. * | U+013A | ĺ | l | Latin small letter l with acute |
  1210. * | U+013B | Ļ | L | Latin capital letter L with cedilla |
  1211. * | U+013C | ļ | l | Latin small letter l with cedilla |
  1212. * | U+013D | Ľ | L | Latin capital letter L with caron |
  1213. * | U+013E | ľ | l | Latin small letter l with caron |
  1214. * | U+013F | Ŀ | L | Latin capital letter L with middle dot |
  1215. * | U+0140 | ŀ | l | Latin small letter l with middle dot |
  1216. * | U+0141 | Ł | L | Latin capital letter L with stroke |
  1217. * | U+0142 | ł | l | Latin small letter l with stroke |
  1218. * | U+0143 | Ń | N | Latin capital letter N with acute |
  1219. * | U+0144 | ń | n | Latin small letter N with acute |
  1220. * | U+0145 | Ņ | N | Latin capital letter N with cedilla |
  1221. * | U+0146 | ņ | n | Latin small letter n with cedilla |
  1222. * | U+0147 | Ň | N | Latin capital letter N with caron |
  1223. * | U+0148 | ň | n | Latin small letter n with caron |
  1224. * | U+0149 | ʼn | n | Latin small letter n preceded by apostrophe |
  1225. * | U+014A | Ŋ | N | Latin capital letter Eng |
  1226. * | U+014B | ŋ | n | Latin small letter Eng |
  1227. * | U+014C | Ō | O | Latin capital letter O with macron |
  1228. * | U+014D | ō | o | Latin small letter o with macron |
  1229. * | U+014E | Ŏ | O | Latin capital letter O with breve |
  1230. * | U+014F | ŏ | o | Latin small letter o with breve |
  1231. * | U+0150 | Ő | O | Latin capital letter O with double acute |
  1232. * | U+0151 | ő | o | Latin small letter o with double acute |
  1233. * | U+0152 | Œ | OE | Latin capital ligature OE |
  1234. * | U+0153 | œ | oe | Latin small ligature oe |
  1235. * | U+0154 | Ŕ | R | Latin capital letter R with acute |
  1236. * | U+0155 | ŕ | r | Latin small letter r with acute |
  1237. * | U+0156 | Ŗ | R | Latin capital letter R with cedilla |
  1238. * | U+0157 | ŗ | r | Latin small letter r with cedilla |
  1239. * | U+0158 | Ř | R | Latin capital letter R with caron |
  1240. * | U+0159 | ř | r | Latin small letter r with caron |
  1241. * | U+015A | Ś | S | Latin capital letter S with acute |
  1242. * | U+015B | ś | s | Latin small letter s with acute |
  1243. * | U+015C | Ŝ | S | Latin capital letter S with circumflex |
  1244. * | U+015D | ŝ | s | Latin small letter s with circumflex |
  1245. * | U+015E | Ş | S | Latin capital letter S with cedilla |
  1246. * | U+015F | ş | s | Latin small letter s with cedilla |
  1247. * | U+0160 | Š | S | Latin capital letter S with caron |
  1248. * | U+0161 | š | s | Latin small letter s with caron |
  1249. * | U+0162 | Ţ | T | Latin capital letter T with cedilla |
  1250. * | U+0163 | ţ | t | Latin small letter t with cedilla |
  1251. * | U+0164 | Ť | T | Latin capital letter T with caron |
  1252. * | U+0165 | ť | t | Latin small letter t with caron |
  1253. * | U+0166 | Ŧ | T | Latin capital letter T with stroke |
  1254. * | U+0167 | ŧ | t | Latin small letter t with stroke |
  1255. * | U+0168 | Ũ | U | Latin capital letter U with tilde |
  1256. * | U+0169 | ũ | u | Latin small letter u with tilde |
  1257. * | U+016A | Ū | U | Latin capital letter U with macron |
  1258. * | U+016B | ū | u | Latin small letter u with macron |
  1259. * | U+016C | Ŭ | U | Latin capital letter U with breve |
  1260. * | U+016D | ŭ | u | Latin small letter u with breve |
  1261. * | U+016E | Ů | U | Latin capital letter U with ring above |
  1262. * | U+016F | ů | u | Latin small letter u with ring above |
  1263. * | U+0170 | Ű | U | Latin capital letter U with double acute |
  1264. * | U+0171 | ű | u | Latin small letter u with double acute |
  1265. * | U+0172 | Ų | U | Latin capital letter U with ogonek |
  1266. * | U+0173 | ų | u | Latin small letter u with ogonek |
  1267. * | U+0174 | Ŵ | W | Latin capital letter W with circumflex |
  1268. * | U+0175 | ŵ | w | Latin small letter w with circumflex |
  1269. * | U+0176 | Ŷ | Y | Latin capital letter Y with circumflex |
  1270. * | U+0177 | ŷ | y | Latin small letter y with circumflex |
  1271. * | U+0178 | Ÿ | Y | Latin capital letter Y with diaeresis |
  1272. * | U+0179 | Ź | Z | Latin capital letter Z with acute |
  1273. * | U+017A | ź | z | Latin small letter z with acute |
  1274. * | U+017B | Ż | Z | Latin capital letter Z with dot above |
  1275. * | U+017C | ż | z | Latin small letter z with dot above |
  1276. * | U+017D | Ž | Z | Latin capital letter Z with caron |
  1277. * | U+017E | ž | z | Latin small letter z with caron |
  1278. * | U+017F | ſ | s | Latin small letter long s |
  1279. * | U+01A0 | Ơ | O | Latin capital letter O with horn |
  1280. * | U+01A1 | ơ | o | Latin small letter o with horn |
  1281. * | U+01AF | Ư | U | Latin capital letter U with horn |
  1282. * | U+01B0 | ư | u | Latin small letter u with horn |
  1283. * | U+01CD | Ǎ | A | Latin capital letter A with caron |
  1284. * | U+01CE | ǎ | a | Latin small letter a with caron |
  1285. * | U+01CF | Ǐ | I | Latin capital letter I with caron |
  1286. * | U+01D0 | ǐ | i | Latin small letter i with caron |
  1287. * | U+01D1 | Ǒ | O | Latin capital letter O with caron |
  1288. * | U+01D2 | ǒ | o | Latin small letter o with caron |
  1289. * | U+01D3 | Ǔ | U | Latin capital letter U with caron |
  1290. * | U+01D4 | ǔ | u | Latin small letter u with caron |
  1291. * | U+01D5 | Ǖ | U | Latin capital letter U with diaeresis and macron |
  1292. * | U+01D6 | ǖ | u | Latin small letter u with diaeresis and macron |
  1293. * | U+01D7 | Ǘ | U | Latin capital letter U with diaeresis and acute |
  1294. * | U+01D8 | ǘ | u | Latin small letter u with diaeresis and acute |
  1295. * | U+01D9 | Ǚ | U | Latin capital letter U with diaeresis and caron |
  1296. * | U+01DA | ǚ | u | Latin small letter u with diaeresis and caron |
  1297. * | U+01DB | Ǜ | U | Latin capital letter U with diaeresis and grave |
  1298. * | U+01DC | ǜ | u | Latin small letter u with diaeresis and grave |
  1299. *
  1300. * Decompositions for Latin Extended-B:
  1301. *
  1302. * | Code | Glyph | Replacement | Description |
  1303. * | -------- | ----- | ----------- | ----------------------------------------- |
  1304. * | U+0218 | Ș | S | Latin capital letter S with comma below |
  1305. * | U+0219 | ș | s | Latin small letter s with comma below |
  1306. * | U+021A | Ț | T | Latin capital letter T with comma below |
  1307. * | U+021B | ț | t | Latin small letter t with comma below |
  1308. *
  1309. * Vowels with diacritic (Chinese, Hanyu Pinyin):
  1310. *
  1311. * | Code | Glyph | Replacement | Description |
  1312. * | -------- | ----- | ----------- | ----------------------------------------------------- |
  1313. * | U+0251 | ɑ | a | Latin small letter alpha |
  1314. * | U+1EA0 | Ạ | A | Latin capital letter A with dot below |
  1315. * | U+1EA1 | ạ | a | Latin small letter a with dot below |
  1316. * | U+1EA2 | Ả | A | Latin capital letter A with hook above |
  1317. * | U+1EA3 | ả | a | Latin small letter a with hook above |
  1318. * | U+1EA4 | Ấ | A | Latin capital letter A with circumflex and acute |
  1319. * | U+1EA5 | ấ | a | Latin small letter a with circumflex and acute |
  1320. * | U+1EA6 | Ầ | A | Latin capital letter A with circumflex and grave |
  1321. * | U+1EA7 | ầ | a | Latin small letter a with circumflex and grave |
  1322. * | U+1EA8 | Ẩ | A | Latin capital letter A with circumflex and hook above |
  1323. * | U+1EA9 | ẩ | a | Latin small letter a with circumflex and hook above |
  1324. * | U+1EAA | Ẫ | A | Latin capital letter A with circumflex and tilde |
  1325. * | U+1EAB | ẫ | a | Latin small letter a with circumflex and tilde |
  1326. * | U+1EA6 | Ậ | A | Latin capital letter A with circumflex and dot below |
  1327. * | U+1EAD | ậ | a | Latin small letter a with circumflex and dot below |
  1328. * | U+1EAE | Ắ | A | Latin capital letter A with breve and acute |
  1329. * | U+1EAF | ắ | a | Latin small letter a with breve and acute |
  1330. * | U+1EB0 | Ằ | A | Latin capital letter A with breve and grave |
  1331. * | U+1EB1 | ằ | a | Latin small letter a with breve and grave |
  1332. * | U+1EB2 | Ẳ | A | Latin capital letter A with breve and hook above |
  1333. * | U+1EB3 | ẳ | a | Latin small letter a with breve and hook above |
  1334. * | U+1EB4 | Ẵ | A | Latin capital letter A with breve and tilde |
  1335. * | U+1EB5 | ẵ | a | Latin small letter a with breve and tilde |
  1336. * | U+1EB6 | Ặ | A | Latin capital letter A with breve and dot below |
  1337. * | U+1EB7 | ặ | a | Latin small letter a with breve and dot below |
  1338. * | U+1EB8 | Ẹ | E | Latin capital letter E with dot below |
  1339. * | U+1EB9 | ẹ | e | Latin small letter e with dot below |
  1340. * | U+1EBA | Ẻ | E | Latin capital letter E with hook above |
  1341. * | U+1EBB | ẻ | e | Latin small letter e with hook above |
  1342. * | U+1EBC | Ẽ | E | Latin capital letter E with tilde |
  1343. * | U+1EBD | ẽ | e | Latin small letter e with tilde |
  1344. * | U+1EBE | Ế | E | Latin capital letter E with circumflex and acute |
  1345. * | U+1EBF | ế | e | Latin small letter e with circumflex and acute |
  1346. * | U+1EC0 | Ề | E | Latin capital letter E with circumflex and grave |
  1347. * | U+1EC1 | ề | e | Latin small letter e with circumflex and grave |
  1348. * | U+1EC2 | Ể | E | Latin capital letter E with circumflex and hook above |
  1349. * | U+1EC3 | ể | e | Latin small letter e with circumflex and hook above |
  1350. * | U+1EC4 | Ễ | E | Latin capital letter E with circumflex and tilde |
  1351. * | U+1EC5 | ễ | e | Latin small letter e with circumflex and tilde |
  1352. * | U+1EC6 | Ệ | E | Latin capital letter E with circumflex and dot below |
  1353. * | U+1EC7 | ệ | e | Latin small letter e with circumflex and dot below |
  1354. * | U+1EC8 | Ỉ | I | Latin capital letter I with hook above |
  1355. * | U+1EC9 | ỉ | i | Latin small letter i with hook above |
  1356. * | U+1ECA | Ị | I | Latin capital letter I with dot below |
  1357. * | U+1ECB | ị | i | Latin small letter i with dot below |
  1358. * | U+1ECC | Ọ | O | Latin capital letter O with dot below |
  1359. * | U+1ECD | ọ | o | Latin small letter o with dot below |
  1360. * | U+1ECE | Ỏ | O | Latin capital letter O with hook above |
  1361. * | U+1ECF | ỏ | o | Latin small letter o with hook above |
  1362. * | U+1ED0 | Ố | O | Latin capital letter O with circumflex and acute |
  1363. * | U+1ED1 | ố | o | Latin small letter o with circumflex and acute |
  1364. * | U+1ED2 | Ồ | O | Latin capital letter O with circumflex and grave |
  1365. * | U+1ED3 | ồ | o | Latin small letter o with circumflex and grave |
  1366. * | U+1ED4 | Ổ | O | Latin capital letter O with circumflex and hook above |
  1367. * | U+1ED5 | ổ | o | Latin small letter o with circumflex and hook above |
  1368. * | U+1ED6 | Ỗ | O | Latin capital letter O with circumflex and tilde |
  1369. * | U+1ED7 | ỗ | o | Latin small letter o with circumflex and tilde |
  1370. * | U+1ED8 | Ộ | O | Latin capital letter O with circumflex and dot below |
  1371. * | U+1ED9 | ộ | o | Latin small letter o with circumflex and dot below |
  1372. * | U+1EDA | Ớ | O | Latin capital letter O with horn and acute |
  1373. * | U+1EDB | ớ | o | Latin small letter o with horn and acute |
  1374. * | U+1EDC | Ờ | O | Latin capital letter O with horn and grave |
  1375. * | U+1EDD | ờ | o | Latin small letter o with horn and grave |
  1376. * | U+1EDE | Ở | O | Latin capital letter O with horn and hook above |
  1377. * | U+1EDF | ở | o | Latin small letter o with horn and hook above |
  1378. * | U+1EE0 | Ỡ | O | Latin capital letter O with horn and tilde |
  1379. * | U+1EE1 | ỡ | o | Latin small letter o with horn and tilde |
  1380. * | U+1EE2 | Ợ | O | Latin capital letter O with horn and dot below |
  1381. * | U+1EE3 | ợ | o | Latin small letter o with horn and dot below |
  1382. * | U+1EE4 | Ụ | U | Latin capital letter U with dot below |
  1383. * | U+1EE5 | ụ | u | Latin small letter u with dot below |
  1384. * | U+1EE6 | Ủ | U | Latin capital letter U with hook above |
  1385. * | U+1EE7 | ủ | u | Latin small letter u with hook above |
  1386. * | U+1EE8 | Ứ | U | Latin capital letter U with horn and acute |
  1387. * | U+1EE9 | ứ | u | Latin small letter u with horn and acute |
  1388. * | U+1EEA | Ừ | U | Latin capital letter U with horn and grave |
  1389. * | U+1EEB | ừ | u | Latin small letter u with horn and grave |
  1390. * | U+1EEC | Ử | U | Latin capital letter U with horn and hook above |
  1391. * | U+1EED | ử | u | Latin small letter u with horn and hook above |
  1392. * | U+1EEE | Ữ | U | Latin capital letter U with horn and tilde |
  1393. * | U+1EEF | ữ | u | Latin small letter u with horn and tilde |
  1394. * | U+1EF0 | Ự | U | Latin capital letter U with horn and dot below |
  1395. * | U+1EF1 | ự | u | Latin small letter u with horn and dot below |
  1396. * | U+1EF2 | Ỳ | Y | Latin capital letter Y with grave |
  1397. * | U+1EF3 | ỳ | y | Latin small letter y with grave |
  1398. * | U+1EF4 | Ỵ | Y | Latin capital letter Y with dot below |
  1399. * | U+1EF5 | ỵ | y | Latin small letter y with dot below |
  1400. * | U+1EF6 | Ỷ | Y | Latin capital letter Y with hook above |
  1401. * | U+1EF7 | ỷ | y | Latin small letter y with hook above |
  1402. * | U+1EF8 | Ỹ | Y | Latin capital letter Y with tilde |
  1403. * | U+1EF9 | ỹ | y | Latin small letter y with tilde |
  1404. *
  1405. * German (`de_DE`), German formal (`de_DE_formal`), German (Switzerland) formal (`de_CH`),
  1406. * and German (Switzerland) informal (`de_CH_informal`) locales:
  1407. *
  1408. * | Code | Glyph | Replacement | Description |
  1409. * | -------- | ----- | ----------- | --------------------------------------- |
  1410. * | U+00C4 | Ä | Ae | Latin capital letter A with diaeresis |
  1411. * | U+00E4 | ä | ae | Latin small letter a with diaeresis |
  1412. * | U+00D6 | Ö | Oe | Latin capital letter O with diaeresis |
  1413. * | U+00F6 | ö | oe | Latin small letter o with diaeresis |
  1414. * | U+00DC | Ü | Ue | Latin capital letter U with diaeresis |
  1415. * | U+00FC | ü | ue | Latin small letter u with diaeresis |
  1416. * | U+00DF | ß | ss | Latin small letter sharp s |
  1417. *
  1418. * Danish (`da_DK`) locale:
  1419. *
  1420. * | Code | Glyph | Replacement | Description |
  1421. * | -------- | ----- | ----------- | --------------------------------------- |
  1422. * | U+00C6 | Æ | Ae | Latin capital letter AE |
  1423. * | U+00E6 | æ | ae | Latin small letter ae |
  1424. * | U+00D8 | Ø | Oe | Latin capital letter O with stroke |
  1425. * | U+00F8 | ø | oe | Latin small letter o with stroke |
  1426. * | U+00C5 | Å | Aa | Latin capital letter A with ring above |
  1427. * | U+00E5 | å | aa | Latin small letter a with ring above |
  1428. *
  1429. * Catalan (`ca`) locale:
  1430. *
  1431. * | Code | Glyph | Replacement | Description |
  1432. * | -------- | ----- | ----------- | --------------------------------------- |
  1433. * | U+00B7 | l·l | ll | Flown dot (between two Ls) |
  1434. *
  1435. * Serbian (`sr_RS`) and Bosnian (`bs_BA`) locales:
  1436. *
  1437. * | Code | Glyph | Replacement | Description |
  1438. * | -------- | ----- | ----------- | --------------------------------------- |
  1439. * | U+0110 | Đ | DJ | Latin capital letter D with stroke |
  1440. * | U+0111 | đ | dj | Latin small letter d with stroke |
  1441. *
  1442. * @since 1.2.1
  1443. * @since 4.6.0 Added locale support for `de_CH`, `de_CH_informal`, and `ca`.
  1444. * @since 4.7.0 Added locale support for `sr_RS`.
  1445. * @since 4.8.0 Added locale support for `bs_BA`.
  1446. *
  1447. * @param string $string Text that might have accent characters
  1448. * @return string Filtered string with replaced "nice" characters.
  1449. */
  1450. function remove_accents( $string ) {
  1451. if ( ! preg_match( '/[\x80-\xff]/', $string ) ) {
  1452. return $string;
  1453. }
  1454. if ( seems_utf8( $string ) ) {
  1455. $chars = array(
  1456. // Decompositions for Latin-1 Supplement
  1457. 'ª' => 'a',
  1458. 'º' => 'o',
  1459. 'À' => 'A',
  1460. 'Á' => 'A',
  1461. 'Â' => 'A',
  1462. 'Ã' => 'A',
  1463. 'Ä' => 'A',
  1464. 'Å' => 'A',
  1465. 'Æ' => 'AE',
  1466. 'Ç' => 'C',
  1467. 'È' => 'E',
  1468. 'É' => 'E',
  1469. 'Ê' => 'E',
  1470. 'Ë' => 'E',
  1471. 'Ì' => 'I',
  1472. 'Í' => 'I',
  1473. 'Î' => 'I',
  1474. 'Ï' => 'I',
  1475. 'Ð' => 'D',
  1476. 'Ñ' => 'N',
  1477. 'Ò' => 'O',
  1478. 'Ó' => 'O',
  1479. 'Ô' => 'O',
  1480. 'Õ' => 'O',
  1481. 'Ö' => 'O',
  1482. 'Ù' => 'U',
  1483. 'Ú' => 'U',
  1484. 'Û' => 'U',
  1485. 'Ü' => 'U',
  1486. 'Ý' => 'Y',
  1487. 'Þ' => 'TH',
  1488. 'ß' => 's',
  1489. 'à' => 'a',
  1490. 'á' => 'a',
  1491. 'â' => 'a',
  1492. 'ã' => 'a',
  1493. 'ä' => 'a',
  1494. 'å' => 'a',
  1495. 'æ' => 'ae',
  1496. 'ç' => 'c',
  1497. 'è' => 'e',
  1498. 'é' => 'e',
  1499. 'ê' => 'e',
  1500. 'ë' => 'e',
  1501. 'ì' => 'i',
  1502. 'í' => 'i',
  1503. 'î' => 'i',
  1504. 'ï' => 'i',
  1505. 'ð' => 'd',
  1506. 'ñ' => 'n',
  1507. 'ò' => 'o',
  1508. 'ó' => 'o',
  1509. 'ô' => 'o',
  1510. 'õ' => 'o',
  1511. 'ö' => 'o',
  1512. 'ø' => 'o',
  1513. 'ù' => 'u',
  1514. 'ú' => 'u',
  1515. 'û' => 'u',
  1516. 'ü' => 'u',
  1517. 'ý' => 'y',
  1518. 'þ' => 'th',
  1519. 'ÿ' => 'y',
  1520. 'Ø' => 'O',
  1521. // Decompositions for Latin Extended-A
  1522. 'Ā' => 'A',
  1523. 'ā' => 'a',
  1524. 'Ă' => 'A',
  1525. 'ă' => 'a',
  1526. 'Ą' => 'A',
  1527. 'ą' => 'a',
  1528. 'Ć' => 'C',
  1529. 'ć' => 'c',
  1530. 'Ĉ' => 'C',
  1531. 'ĉ' => 'c',
  1532. 'Ċ' => 'C',
  1533. 'ċ' => 'c',
  1534. 'Č' => 'C',
  1535. 'č' => 'c',
  1536. 'Ď' => 'D',
  1537. 'ď' => 'd',
  1538. 'Đ' => 'D',
  1539. 'đ' => 'd',
  1540. 'Ē' => 'E',
  1541. 'ē' => 'e',
  1542. 'Ĕ' => 'E',
  1543. 'ĕ' => 'e',
  1544. 'Ė' => 'E',
  1545. 'ė' => 'e',
  1546. 'Ę' => 'E',
  1547. 'ę' => 'e',
  1548. 'Ě' => 'E',
  1549. 'ě' => 'e',
  1550. 'Ĝ' => 'G',
  1551. 'ĝ' => 'g',
  1552. 'Ğ' => 'G',
  1553. 'ğ' => 'g',
  1554. 'Ġ' => 'G',
  1555. 'ġ' => 'g',
  1556. 'Ģ' => 'G',
  1557. 'ģ' => 'g',
  1558. 'Ĥ' => 'H',
  1559. 'ĥ' => 'h',
  1560. 'Ħ' => 'H',
  1561. 'ħ' => 'h',
  1562. 'Ĩ' => 'I',
  1563. 'ĩ' => 'i',
  1564. 'Ī' => 'I',
  1565. 'ī' => 'i',
  1566. 'Ĭ' => 'I',
  1567. 'ĭ' => 'i',
  1568. 'Į' => 'I',
  1569. 'į' => 'i',
  1570. 'İ' => 'I',
  1571. 'ı' => 'i',
  1572. 'IJ' => 'IJ',
  1573. 'ij' => 'ij',
  1574. 'Ĵ' => 'J',
  1575. 'ĵ' => 'j',
  1576. 'Ķ' => 'K',
  1577. 'ķ' => 'k',
  1578. 'ĸ' => 'k',
  1579. 'Ĺ' => 'L',
  1580. 'ĺ' => 'l',
  1581. 'Ļ' => 'L',
  1582. 'ļ' => 'l',
  1583. 'Ľ' => 'L',
  1584. 'ľ' => 'l',
  1585. 'Ŀ' => 'L',
  1586. 'ŀ' => 'l',
  1587. 'Ł' => 'L',
  1588. 'ł' => 'l',
  1589. 'Ń' => 'N',
  1590. 'ń' => 'n',
  1591. 'Ņ' => 'N',
  1592. 'ņ' => 'n',
  1593. 'Ň' => 'N',
  1594. 'ň' => 'n',
  1595. 'ʼn' => 'n',
  1596. 'Ŋ' => 'N',
  1597. 'ŋ' => 'n',
  1598. 'Ō' => 'O',
  1599. 'ō' => 'o',
  1600. 'Ŏ' => 'O',
  1601. 'ŏ' => 'o',
  1602. 'Ő' => 'O',
  1603. 'ő' => 'o',
  1604. 'Œ' => 'OE',
  1605. 'œ' => 'oe',
  1606. 'Ŕ' => 'R',
  1607. 'ŕ' => 'r',
  1608. 'Ŗ' => 'R',
  1609. 'ŗ' => 'r',
  1610. 'Ř' => 'R',
  1611. 'ř' => 'r',
  1612. 'Ś' => 'S',
  1613. 'ś' => 's',
  1614. 'Ŝ' => 'S',
  1615. 'ŝ' => 's',
  1616. 'Ş' => 'S',
  1617. 'ş' => 's',
  1618. 'Š' => 'S',
  1619. 'š' => 's',
  1620. 'Ţ' => 'T',
  1621. 'ţ' => 't',
  1622. 'Ť' => 'T',
  1623. 'ť' => 't',
  1624. 'Ŧ' => 'T',
  1625. 'ŧ' => 't',
  1626. 'Ũ' => 'U',
  1627. 'ũ' => 'u',
  1628. 'Ū' => 'U',
  1629. 'ū' => 'u',
  1630. 'Ŭ' => 'U',
  1631. 'ŭ' => 'u',
  1632. 'Ů' => 'U',
  1633. 'ů' => 'u',
  1634. 'Ű' => 'U',
  1635. 'ű' => 'u',
  1636. 'Ų' => 'U',
  1637. 'ų' => 'u',
  1638. 'Ŵ' => 'W',
  1639. 'ŵ' => 'w',
  1640. 'Ŷ' => 'Y',
  1641. 'ŷ' => 'y',
  1642. 'Ÿ' => 'Y',
  1643. 'Ź' => 'Z',
  1644. 'ź' => 'z',
  1645. 'Ż' => 'Z',
  1646. 'ż' => 'z',
  1647. 'Ž' => 'Z',
  1648. 'ž' => 'z',
  1649. 'ſ' => 's',
  1650. // Decompositions for Latin Extended-B
  1651. 'Ș' => 'S',
  1652. 'ș' => 's',
  1653. 'Ț' => 'T',
  1654. 'ț' => 't',
  1655. // Euro Sign
  1656. '€' => 'E',
  1657. // GBP (Pound) Sign
  1658. '£' => '',
  1659. // Vowels with diacritic (Vietnamese)
  1660. // unmarked
  1661. 'Ơ' => 'O',
  1662. 'ơ' => 'o',
  1663. 'Ư' => 'U',
  1664. 'ư' => 'u',
  1665. // grave accent
  1666. 'Ầ' => 'A',
  1667. 'ầ' => 'a',
  1668. 'Ằ' => 'A',
  1669. 'ằ' => 'a',
  1670. 'Ề' => 'E',
  1671. 'ề' => 'e',
  1672. 'Ồ' => 'O',
  1673. 'ồ' => 'o',
  1674. 'Ờ' => 'O',
  1675. 'ờ' => 'o',
  1676. 'Ừ' => 'U',
  1677. 'ừ' => 'u',
  1678. 'Ỳ' => 'Y',
  1679. 'ỳ' => 'y',
  1680. // hook
  1681. 'Ả' => 'A',
  1682. 'ả' => 'a',
  1683. 'Ẩ' => 'A',
  1684. 'ẩ' => 'a',
  1685. 'Ẳ' => 'A',
  1686. 'ẳ' => 'a',
  1687. 'Ẻ' => 'E',
  1688. 'ẻ' => 'e',
  1689. 'Ể' => 'E',
  1690. 'ể' => 'e',
  1691. 'Ỉ' => 'I',
  1692. 'ỉ' => 'i',
  1693. 'Ỏ' => 'O',
  1694. 'ỏ' => 'o',
  1695. 'Ổ' => 'O',
  1696. 'ổ' => 'o',
  1697. 'Ở' => 'O',
  1698. 'ở' => 'o',
  1699. 'Ủ' => 'U',
  1700. 'ủ' => 'u',
  1701. 'Ử' => 'U',
  1702. 'ử' => 'u',
  1703. 'Ỷ' => 'Y',
  1704. 'ỷ' => 'y',
  1705. // tilde
  1706. 'Ẫ' => 'A',
  1707. 'ẫ' => 'a',
  1708. 'Ẵ' => 'A',
  1709. 'ẵ' => 'a',
  1710. 'Ẽ' => 'E',
  1711. 'ẽ' => 'e',
  1712. 'Ễ' => 'E',
  1713. 'ễ' => 'e',
  1714. 'Ỗ' => 'O',
  1715. 'ỗ' => 'o',
  1716. 'Ỡ' => 'O',
  1717. 'ỡ' => 'o',
  1718. 'Ữ' => 'U',
  1719. 'ữ' => 'u',
  1720. 'Ỹ' => 'Y',
  1721. 'ỹ' => 'y',
  1722. // acute accent
  1723. 'Ấ' => 'A',
  1724. 'ấ' => 'a',
  1725. 'Ắ' => 'A',
  1726. 'ắ' => 'a',
  1727. 'Ế' => 'E',
  1728. 'ế' => 'e',
  1729. 'Ố' => 'O',
  1730. 'ố' => 'o',
  1731. 'Ớ' => 'O',
  1732. 'ớ' => 'o',
  1733. 'Ứ' => 'U',
  1734. 'ứ' => 'u',
  1735. // dot below
  1736. 'Ạ' => 'A',
  1737. 'ạ' => 'a',
  1738. 'Ậ' => 'A',
  1739. 'ậ' => 'a',
  1740. 'Ặ' => 'A',
  1741. 'ặ' => 'a',
  1742. 'Ẹ' => 'E',
  1743. 'ẹ' => 'e',
  1744. 'Ệ' => 'E',
  1745. 'ệ' => 'e',
  1746. 'Ị' => 'I',
  1747. 'ị' => 'i',
  1748. 'Ọ' => 'O',
  1749. 'ọ' => 'o',
  1750. 'Ộ' => 'O',
  1751. 'ộ' => 'o',
  1752. 'Ợ' => 'O',
  1753. 'ợ' => 'o',
  1754. 'Ụ' => 'U',
  1755. 'ụ' => 'u',
  1756. 'Ự' => 'U',
  1757. 'ự' => 'u',
  1758. 'Ỵ' => 'Y',
  1759. 'ỵ' => 'y',
  1760. // Vowels with diacritic (Chinese, Hanyu Pinyin)
  1761. 'ɑ' => 'a',
  1762. // macron
  1763. 'Ǖ' => 'U',
  1764. 'ǖ' => 'u',
  1765. // acute accent
  1766. 'Ǘ' => 'U',
  1767. 'ǘ' => 'u',
  1768. // caron
  1769. 'Ǎ' => 'A',
  1770. 'ǎ' => 'a',
  1771. 'Ǐ' => 'I',
  1772. 'ǐ' => 'i',
  1773. 'Ǒ' => 'O',
  1774. 'ǒ' => 'o',
  1775. 'Ǔ' => 'U',
  1776. 'ǔ' => 'u',
  1777. 'Ǚ' => 'U',
  1778. 'ǚ' => 'u',
  1779. // grave accent
  1780. 'Ǜ' => 'U',
  1781. 'ǜ' => 'u',
  1782. );
  1783. // Used for locale-specific rules
  1784. $locale = get_locale();
  1785. if ( 'de_DE' == $locale || 'de_DE_formal' == $locale || 'de_CH' == $locale || 'de_CH_informal' == $locale ) {
  1786. $chars['Ä'] = 'Ae';
  1787. $chars['ä'] = 'ae';
  1788. $chars['Ö'] = 'Oe';
  1789. $chars['ö'] = 'oe';
  1790. $chars['Ü'] = 'Ue';
  1791. $chars['ü'] = 'ue';
  1792. $chars['ß'] = 'ss';
  1793. } elseif ( 'da_DK' === $locale ) {
  1794. $chars['Æ'] = 'Ae';
  1795. $chars['æ'] = 'ae';
  1796. $chars['Ø'] = 'Oe';
  1797. $chars['ø'] = 'oe';
  1798. $chars['Å'] = 'Aa';
  1799. $chars['å'] = 'aa';
  1800. } elseif ( 'ca' === $locale ) {
  1801. $chars['l·l'] = 'll';
  1802. } elseif ( 'sr_RS' === $locale || 'bs_BA' === $locale ) {
  1803. $chars['Đ'] = 'DJ';
  1804. $chars['đ'] = 'dj';
  1805. }
  1806. $string = strtr( $string, $chars );
  1807. } else {
  1808. $chars = array();
  1809. // Assume ISO-8859-1 if not UTF-8
  1810. $chars['in'] = "\x80\x83\x8a\x8e\x9a\x9e"
  1811. . "\x9f\xa2\xa5\xb5\xc0\xc1\xc2"
  1812. . "\xc3\xc4\xc5\xc7\xc8\xc9\xca"
  1813. . "\xcb\xcc\xcd\xce\xcf\xd1\xd2"
  1814. . "\xd3\xd4\xd5\xd6\xd8\xd9\xda"
  1815. . "\xdb\xdc\xdd\xe0\xe1\xe2\xe3"
  1816. . "\xe4\xe5\xe7\xe8\xe9\xea\xeb"
  1817. . "\xec\xed\xee\xef\xf1\xf2\xf3"
  1818. . "\xf4\xf5\xf6\xf8\xf9\xfa\xfb"
  1819. . "\xfc\xfd\xff";
  1820. $chars['out'] = 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy';
  1821. $string = strtr( $string, $chars['in'], $chars['out'] );
  1822. $double_chars = array();
  1823. $double_chars['in'] = array( "\x8c", "\x9c", "\xc6", "\xd0", "\xde", "\xdf", "\xe6", "\xf0", "\xfe" );
  1824. $double_chars['out'] = array( 'OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th' );
  1825. $string = str_replace( $double_chars['in'], $double_chars['out'], $string );
  1826. }
  1827. return $string;
  1828. }
  1829. /**
  1830. * Sanitizes a filename, replacing whitespace with dashes.
  1831. *
  1832. * Removes special characters that are illegal in filenames on certain
  1833. * operating systems and special characters requiring special escaping
  1834. * to manipulate at the command line. Replaces spaces and consecutive
  1835. * dashes with a single dash. Trims period, dash and underscore from beginning
  1836. * and end of filename. It is not guaranteed that this function will return a
  1837. * filename that is allowed to be uploaded.
  1838. *
  1839. * @since 2.1.0
  1840. *
  1841. * @param string $filename The filename to be sanitized
  1842. * @return string The sanitized filename
  1843. */
  1844. function sanitize_file_name( $filename ) {
  1845. $filename_raw = $filename;
  1846. $special_chars = array( '?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"', '&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}', '%', '+', chr( 0 ) );
  1847. /**
  1848. * Filters the list of characters to remove from a filename.
  1849. *
  1850. * @since 2.8.0
  1851. *
  1852. * @param array $special_chars Characters to remove.
  1853. * @param string $filename_raw Filename as it was passed into sanitize_file_name().
  1854. */
  1855. $special_chars = apply_filters( 'sanitize_file_name_chars', $special_chars, $filename_raw );
  1856. $filename = preg_replace( "#\x{00a0}#siu", ' ', $filename );
  1857. $filename = str_replace( $special_chars, '', $filename );
  1858. $filename = str_replace( array( '%20', '+' ), '-', $filename );
  1859. $filename = preg_replace( '/[\r\n\t -]+/', '-', $filename );
  1860. $filename = trim( $filename, '.-_' );
  1861. if ( false === strpos( $filename, '.' ) ) {
  1862. $mime_types = wp_get_mime_types();
  1863. $filetype = wp_check_filetype( 'test.' . $filename, $mime_types );
  1864. if ( $filetype['ext'] === $filename ) {
  1865. $filename = 'unnamed-file.' . $filetype['ext'];
  1866. }
  1867. }
  1868. // Split the filename into a base and extension[s]
  1869. $parts = explode( '.', $filename );
  1870. // Return if only one extension
  1871. if ( count( $parts ) <= 2 ) {
  1872. /**
  1873. * Filters a sanitized filename string.
  1874. *
  1875. * @since 2.8.0
  1876. *
  1877. * @param string $filename Sanitized filename.
  1878. * @param string $filename_raw The filename prior to sanitization.
  1879. */
  1880. return apply_filters( 'sanitize_file_name', $filename, $filename_raw );
  1881. }
  1882. // Process multiple extensions
  1883. $filename = array_shift( $parts );
  1884. $extension = array_pop( $parts );
  1885. $mimes = get_allowed_mime_types();
  1886. /*
  1887. * Loop over any intermediate extensions. Postfix them with a trailing underscore
  1888. * if they are a 2 - 5 character long alpha string not in the extension whitelist.
  1889. */
  1890. foreach ( (array) $parts as $part ) {
  1891. $filename .= '.' . $part;
  1892. if ( preg_match( '/^[a-zA-Z]{2,5}\d?$/', $part ) ) {
  1893. $allowed = false;
  1894. foreach ( $mimes as $ext_preg => $mime_match ) {
  1895. $ext_preg = '!^(' . $ext_preg . ')$!i';
  1896. if ( preg_match( $ext_preg, $part ) ) {
  1897. $allowed = true;
  1898. break;
  1899. }
  1900. }
  1901. if ( ! $allowed ) {
  1902. $filename .= '_';
  1903. }
  1904. }
  1905. }
  1906. $filename .= '.' . $extension;
  1907. /** This filter is documented in wp-includes/formatting.php */
  1908. return apply_filters( 'sanitize_file_name', $filename, $filename_raw );
  1909. }
  1910. /**
  1911. * Sanitizes a username, stripping out unsafe characters.
  1912. *
  1913. * Removes tags, octets, entities, and if strict is enabled, will only keep
  1914. * alphanumeric, _, space, ., -, @. After sanitizing, it passes the username,
  1915. * raw username (the username in the parameter), and the value of $strict as
  1916. * parameters for the {@see 'sanitize_user'} filter.
  1917. *
  1918. * @since 2.0.0
  1919. *
  1920. * @param string $username The username to be sanitized.
  1921. * @param bool $strict If set limits $username to specific characters. Default false.
  1922. * @return string The sanitized username, after passing through filters.
  1923. */
  1924. function sanitize_user( $username, $strict = false ) {
  1925. $raw_username = $username;
  1926. $username = wp_strip_all_tags( $username );
  1927. $username = remove_accents( $username );
  1928. // Kill octets
  1929. $username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username );
  1930. $username = preg_replace( '/&.+?;/', '', $username ); // Kill entities
  1931. // If strict, reduce to ASCII for max portability.
  1932. if ( $strict ) {
  1933. $username = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $username );
  1934. }
  1935. $username = trim( $username );
  1936. // Consolidate contiguous whitespace
  1937. $username = preg_replace( '|\s+|', ' ', $username );
  1938. /**
  1939. * Filters a sanitized username string.
  1940. *
  1941. * @since 2.0.1
  1942. *
  1943. * @param string $username Sanitized username.
  1944. * @param string $raw_username The username prior to sanitization.
  1945. * @param bool $strict Whether to limit the sanitization to specific characters. Default false.
  1946. */
  1947. return apply_filters( 'sanitize_user', $username, $raw_username, $strict );
  1948. }
  1949. /**
  1950. * Sanitizes a string key.
  1951. *
  1952. * Keys are used as internal identifiers. Lowercase alphanumeric characters, dashes and underscores are allowed.
  1953. *
  1954. * @since 3.0.0
  1955. *
  1956. * @param string $key String key
  1957. * @return string Sanitized key
  1958. */
  1959. function sanitize_key( $key ) {
  1960. $raw_key = $key;
  1961. $key = strtolower( $key );
  1962. $key = preg_replace( '/[^a-z0-9_\-]/', '', $key );
  1963. /**
  1964. * Filters a sanitized key string.
  1965. *
  1966. * @since 3.0.0
  1967. *
  1968. * @param string $key Sanitized key.
  1969. * @param string $raw_key The key prior to sanitization.
  1970. */
  1971. return apply_filters( 'sanitize_key', $key, $raw_key );
  1972. }
  1973. /**
  1974. * Sanitizes a title, or returns a fallback title.
  1975. *
  1976. * Specifically, HTML and PHP tags are stripped. Further actions can be added
  1977. * via the plugin API. If $title is empty and $fallback_title is set, the latter
  1978. * will be used.
  1979. *
  1980. * @since 1.0.0
  1981. *
  1982. * @param string $title The string to be sanitized.
  1983. * @param string $fallback_title Optional. A title to use if $title is empty.
  1984. * @param string $context Optional. The operation for which the string is sanitized
  1985. * @return string The sanitized string.
  1986. */
  1987. function sanitize_title( $title, $fallback_title = '', $context = 'save' ) {
  1988. $raw_title = $title;
  1989. if ( 'save' == $context ) {
  1990. $title = remove_accents( $title );
  1991. }
  1992. /**
  1993. * Filters a sanitized title string.
  1994. *
  1995. * @since 1.2.0
  1996. *
  1997. * @param string $title Sanitized title.
  1998. * @param string $raw_title The title prior to sanitization.
  1999. * @param string $context The context for which the title is being sanitized.
  2000. */
  2001. $title = apply_filters( 'sanitize_title', $title, $raw_title, $context );
  2002. if ( '' === $title || false === $title ) {
  2003. $title = $fallback_title;
  2004. }
  2005. return $title;
  2006. }
  2007. /**
  2008. * Sanitizes a title with the 'query' context.
  2009. *
  2010. * Used for querying the database for a value from URL.
  2011. *
  2012. * @since 3.1.0
  2013. *
  2014. * @param string $title The string to be sanitized.
  2015. * @return string The sanitized string.
  2016. */
  2017. function sanitize_title_for_query( $title ) {
  2018. return sanitize_title( $title, '', 'query' );
  2019. }
  2020. /**
  2021. * Sanitizes a title, replacing whitespace and a few other characters with dashes.
  2022. *
  2023. * Limits the output to alphanumeric characters, underscore (_) and dash (-).
  2024. * Whitespace becomes a dash.
  2025. *
  2026. * @since 1.2.0
  2027. *
  2028. * @param string $title The title to be sanitized.
  2029. * @param string $raw_title Optional. Not used.
  2030. * @param string $context Optional. The operation for which the string is sanitized.
  2031. * @return string The sanitized title.
  2032. */
  2033. function sanitize_title_with_dashes( $title, $raw_title = '', $context = 'display' ) {
  2034. $title = strip_tags( $title );
  2035. // Preserve escaped octets.
  2036. $title = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title );
  2037. // Remove percent signs that are not part of an octet.
  2038. $title = str_replace( '%', '', $title );
  2039. // Restore octets.
  2040. $title = preg_replace( '|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title );
  2041. if ( seems_utf8( $title ) ) {
  2042. if ( function_exists( 'mb_strtolower' ) ) {
  2043. $title = mb_strtolower( $title, 'UTF-8' );
  2044. }
  2045. $title = utf8_uri_encode( $title, 200 );
  2046. }
  2047. $title = strtolower( $title );
  2048. if ( 'save' == $context ) {
  2049. // Convert nbsp, ndash and mdash to hyphens
  2050. $title = str_replace( array( '%c2%a0', '%e2%80%93', '%e2%80%94' ), '-', $title );
  2051. // Convert nbsp, ndash and mdash HTML entities to hyphens
  2052. $title = str_replace( array( '&nbsp;', '&#160;', '&ndash;', '&#8211;', '&mdash;', '&#8212;' ), '-', $title );
  2053. // Convert forward slash to hyphen
  2054. $title = str_replace( '/', '-', $title );
  2055. // Strip these characters entirely
  2056. $title = str_replace(
  2057. array(
  2058. // soft hyphens
  2059. '%c2%ad',
  2060. // iexcl and iquest
  2061. '%c2%a1',
  2062. '%c2%bf',
  2063. // angle quotes
  2064. '%c2%ab',
  2065. '%c2%bb',
  2066. '%e2%80%b9',
  2067. '%e2%80%ba',
  2068. // curly quotes
  2069. '%e2%80%98',
  2070. '%e2%80%99',
  2071. '%e2%80%9c',
  2072. '%e2%80%9d',
  2073. '%e2%80%9a',
  2074. '%e2%80%9b',
  2075. '%e2%80%9e',
  2076. '%e2%80%9f',
  2077. // copy, reg, deg, hellip and trade
  2078. '%c2%a9',
  2079. '%c2%ae',
  2080. '%c2%b0',
  2081. '%e2%80%a6',
  2082. '%e2%84%a2',
  2083. // acute accents
  2084. '%c2%b4',
  2085. '%cb%8a',
  2086. '%cc%81',
  2087. '%cd%81',
  2088. // grave accent, macron, caron
  2089. '%cc%80',
  2090. '%cc%84',
  2091. '%cc%8c',
  2092. ),
  2093. '',
  2094. $title
  2095. );
  2096. // Convert times to x
  2097. $title = str_replace( '%c3%97', 'x', $title );
  2098. }
  2099. $title = preg_replace( '/&.+?;/', '', $title ); // kill entities
  2100. $title = str_replace( '.', '-', $title );
  2101. $title = preg_replace( '/[^%a-z0-9 _-]/', '', $title );
  2102. $title = preg_replace( '/\s+/', '-', $title );
  2103. $title = preg_replace( '|-+|', '-', $title );
  2104. $title = trim( $title, '-' );
  2105. return $title;
  2106. }
  2107. /**
  2108. * Ensures a string is a valid SQL 'order by' clause.
  2109. *
  2110. * Accepts one or more columns, with or without a sort order (ASC / DESC).
  2111. * e.g. 'column_1', 'column_1, column_2', 'column_1 ASC, column_2 DESC' etc.
  2112. *
  2113. * Also accepts 'RAND()'.
  2114. *
  2115. * @since 2.5.1
  2116. *
  2117. * @param string $orderby Order by clause to be validated.
  2118. * @return string|false Returns $orderby if valid, false otherwise.
  2119. */
  2120. function sanitize_sql_orderby( $orderby ) {
  2121. if ( preg_match( '/^\s*(([a-z0-9_]+|`[a-z0-9_]+`)(\s+(ASC|DESC))?\s*(,\s*(?=[a-z0-9_`])|$))+$/i', $orderby ) || preg_match( '/^\s*RAND\(\s*\)\s*$/i', $orderby ) ) {
  2122. return $orderby;
  2123. }
  2124. return false;
  2125. }
  2126. /**
  2127. * Sanitizes an HTML classname to ensure it only contains valid characters.
  2128. *
  2129. * Strips the string down to A-Z,a-z,0-9,_,-. If this results in an empty
  2130. * string then it will return the alternative value supplied.
  2131. *
  2132. * @todo Expand to support the full range of CDATA that a class attribute can contain.
  2133. *
  2134. * @since 2.8.0
  2135. *
  2136. * @param string $class The classname to be sanitized
  2137. * @param string $fallback Optional. The value to return if the sanitization ends up as an empty string.
  2138. * Defaults to an empty string.
  2139. * @return string The sanitized value
  2140. */
  2141. function sanitize_html_class( $class, $fallback = '' ) {
  2142. //Strip out any % encoded octets
  2143. $sanitized = preg_replace( '|%[a-fA-F0-9][a-fA-F0-9]|', '', $class );
  2144. //Limit to A-Z,a-z,0-9,_,-
  2145. $sanitized = preg_replace( '/[^A-Za-z0-9_-]/', '', $sanitized );
  2146. if ( '' == $sanitized && $fallback ) {
  2147. return sanitize_html_class( $fallback );
  2148. }
  2149. /**
  2150. * Filters a sanitized HTML class string.
  2151. *
  2152. * @since 2.8.0
  2153. *
  2154. * @param string $sanitized The sanitized HTML class.
  2155. * @param string $class HTML class before sanitization.
  2156. * @param string $fallback The fallback string.
  2157. */
  2158. return apply_filters( 'sanitize_html_class', $sanitized, $class, $fallback );
  2159. }
  2160. /**
  2161. * Converts lone & characters into `&#038;` (a.k.a. `&amp;`)
  2162. *
  2163. * @since 0.71
  2164. *
  2165. * @param string $content String of characters to be converted.
  2166. * @param string $deprecated Not used.
  2167. * @return string Converted string.
  2168. */
  2169. function convert_chars( $content, $deprecated = '' ) {
  2170. if ( ! empty( $deprecated ) ) {
  2171. _deprecated_argument( __FUNCTION__, '0.71' );
  2172. }
  2173. if ( strpos( $content, '&' ) !== false ) {
  2174. $content = preg_replace( '/&([^#])(?![a-z1-4]{1,8};)/i', '&#038;$1', $content );
  2175. }
  2176. return $content;
  2177. }
  2178. /**
  2179. * Converts invalid Unicode references range to valid range.
  2180. *
  2181. * @since 4.3.0
  2182. *
  2183. * @param string $content String with entities that need converting.
  2184. * @return string Converted string.
  2185. */
  2186. function convert_invalid_entities( $content ) {
  2187. $wp_htmltranswinuni = array(
  2188. '&#128;' => '&#8364;', // the Euro sign
  2189. '&#129;' => '',
  2190. '&#130;' => '&#8218;', // these are Windows CP1252 specific characters
  2191. '&#131;' => '&#402;', // they would look weird on non-Windows browsers
  2192. '&#132;' => '&#8222;',
  2193. '&#133;' => '&#8230;',
  2194. '&#134;' => '&#8224;',
  2195. '&#135;' => '&#8225;',
  2196. '&#136;' => '&#710;',
  2197. '&#137;' => '&#8240;',
  2198. '&#138;' => '&#352;',
  2199. '&#139;' => '&#8249;',
  2200. '&#140;' => '&#338;',
  2201. '&#141;' => '',
  2202. '&#142;' => '&#381;',
  2203. '&#143;' => '',
  2204. '&#144;' => '',
  2205. '&#145;' => '&#8216;',
  2206. '&#146;' => '&#8217;',
  2207. '&#147;' => '&#8220;',
  2208. '&#148;' => '&#8221;',
  2209. '&#149;' => '&#8226;',
  2210. '&#150;' => '&#8211;',
  2211. '&#151;' => '&#8212;',
  2212. '&#152;' => '&#732;',
  2213. '&#153;' => '&#8482;',
  2214. '&#154;' => '&#353;',
  2215. '&#155;' => '&#8250;',
  2216. '&#156;' => '&#339;',
  2217. '&#157;' => '',
  2218. '&#158;' => '&#382;',
  2219. '&#159;' => '&#376;',
  2220. );
  2221. if ( strpos( $content, '&#1' ) !== false ) {
  2222. $content = strtr( $content, $wp_htmltranswinuni );
  2223. }
  2224. return $content;
  2225. }
  2226. /**
  2227. * Balances tags if forced to, or if the 'use_balanceTags' option is set to true.
  2228. *
  2229. * @since 0.71
  2230. *
  2231. * @param string $text Text to be balanced
  2232. * @param bool $force If true, forces balancing, ignoring the value of the option. Default false.
  2233. * @return string Balanced text
  2234. */
  2235. function balanceTags( $text, $force = false ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
  2236. if ( $force || (int) get_option( 'use_balanceTags' ) === 1 ) {
  2237. return force_balance_tags( $text );
  2238. } else {
  2239. return $text;
  2240. }
  2241. }
  2242. /**
  2243. * Balances tags of string using a modified stack.
  2244. *
  2245. * @since 2.0.4
  2246. * @since 5.3.0 Improve accuracy and add support for custom element tags.
  2247. *
  2248. * @author Leonard Lin <leonard@acm.org>
  2249. * @license GPL
  2250. * @copyright November 4, 2001
  2251. * @version 1.1
  2252. * @todo Make better - change loop condition to $text in 1.2
  2253. * @internal Modified by Scott Reilly (coffee2code) 02 Aug 2004
  2254. * 1.1 Fixed handling of append/stack pop order of end text
  2255. * Added Cleaning Hooks
  2256. * 1.0 First Version
  2257. *
  2258. * @param string $text Text to be balanced.
  2259. * @return string Balanced text.
  2260. */
  2261. function force_balance_tags( $text ) {
  2262. $tagstack = array();
  2263. $stacksize = 0;
  2264. $tagqueue = '';
  2265. $newtext = '';
  2266. // Known single-entity/self-closing tags
  2267. $single_tags = array( 'area', 'base', 'basefont', 'br', 'col', 'command', 'embed', 'frame', 'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param', 'source' );
  2268. // Tags that can be immediately nested within themselves
  2269. $nestable_tags = array( 'blockquote', 'div', 'object', 'q', 'span' );
  2270. // WP bug fix for comments - in case you REALLY meant to type '< !--'
  2271. $text = str_replace( '< !--', '< !--', $text );
  2272. // WP bug fix for LOVE <3 (and other situations with '<' before a number)
  2273. $text = preg_replace( '#<([0-9]{1})#', '&lt;$1', $text );
  2274. /**
  2275. * Matches supported tags.
  2276. *
  2277. * To get the pattern as a string without the comments paste into a PHP
  2278. * REPL like `php -a`.
  2279. *
  2280. * @see https://html.spec.whatwg.org/#elements-2
  2281. * @see https://w3c.github.io/webcomponents/spec/custom/#valid-custom-element-name
  2282. *
  2283. * @example
  2284. * ~# php -a
  2285. * php > $s = [paste copied contents of expression below including parentheses];
  2286. * php > echo $s;
  2287. */
  2288. $tag_pattern = (
  2289. '#<' . // Start with an opening bracket.
  2290. '(/?)' . // Group 1 - If it's a closing tag it'll have a leading slash.
  2291. '(' . // Group 2 - Tag name.
  2292. // Custom element tags have more lenient rules than HTML tag names.
  2293. '(?:[a-z](?:[a-z0-9._]*)-(?:[a-z0-9._-]+)+)' .
  2294. '|' .
  2295. // Traditional tag rules approximate HTML tag names.
  2296. '(?:[\w:]+)' .
  2297. ')' .
  2298. '(?:' .
  2299. // We either immediately close the tag with its '>' and have nothing here.
  2300. '\s*' .
  2301. '(/?)' . // Group 3 - "attributes" for empty tag.
  2302. '|' .
  2303. // Or we must start with space characters to separate the tag name from the attributes (or whitespace).
  2304. '(\s+)' . // Group 4 - Pre-attribute whitespace.
  2305. '([^>]*)' . // Group 5 - Attributes.
  2306. ')' .
  2307. '>#' // End with a closing bracket.
  2308. );
  2309. while ( preg_match( $tag_pattern, $text, $regex ) ) {
  2310. $full_match = $regex[0];
  2311. $has_leading_slash = ! empty( $regex[1] );
  2312. $tag_name = $regex[2];
  2313. $tag = strtolower( $tag_name );
  2314. $is_single_tag = in_array( $tag, $single_tags, true );
  2315. $pre_attribute_ws = isset( $regex[4] ) ? $regex[4] : '';
  2316. $attributes = trim( isset( $regex[5] ) ? $regex[5] : $regex[3] );
  2317. $has_self_closer = '/' === substr( $attributes, -1 );
  2318. $newtext .= $tagqueue;
  2319. $i = strpos( $text, $full_match );
  2320. $l = strlen( $full_match );
  2321. // Clear the shifter.
  2322. $tagqueue = '';
  2323. if ( $has_leading_slash ) { // End Tag.
  2324. // If too many closing tags.
  2325. if ( $stacksize <= 0 ) {
  2326. $tag = '';
  2327. // Or close to be safe $tag = '/' . $tag.
  2328. // If stacktop value = tag close value, then pop.
  2329. } elseif ( $tagstack[ $stacksize - 1 ] === $tag ) { // Found closing tag.
  2330. $tag = '</' . $tag . '>'; // Close Tag.
  2331. array_pop( $tagstack );
  2332. $stacksize--;
  2333. } else { // Closing tag not at top, search for it.
  2334. for ( $j = $stacksize - 1; $j >= 0; $j-- ) {
  2335. if ( $tagstack[ $j ] === $tag ) {
  2336. // Add tag to tagqueue.
  2337. for ( $k = $stacksize - 1; $k >= $j; $k-- ) {
  2338. $tagqueue .= '</' . array_pop( $tagstack ) . '>';
  2339. $stacksize--;
  2340. }
  2341. break;
  2342. }
  2343. }
  2344. $tag = '';
  2345. }
  2346. } else { // Begin Tag.
  2347. if ( $has_self_closer ) { // If it presents itself as a self-closing tag...
  2348. // ...but it isn't a known single-entity self-closing tag, then don't let it be treated as such and
  2349. // immediately close it with a closing tag (the tag will encapsulate no text as a result)
  2350. if ( ! $is_single_tag ) {
  2351. $attributes = trim( substr( $attributes, 0, -1 ) ) . "></$tag";
  2352. }
  2353. } elseif ( $is_single_tag ) { // ElseIf it's a known single-entity tag but it doesn't close itself, do so
  2354. $pre_attribute_ws = ' ';
  2355. $attributes .= '/';
  2356. } else { // It's not a single-entity tag.
  2357. // If the top of the stack is the same as the tag we want to push, close previous tag.
  2358. if ( $stacksize > 0 && ! in_array( $tag, $nestable_tags, true ) && $tagstack[ $stacksize - 1 ] === $tag ) {
  2359. $tagqueue = '</' . array_pop( $tagstack ) . '>';
  2360. $stacksize--;
  2361. }
  2362. $stacksize = array_push( $tagstack, $tag );
  2363. }
  2364. // Attributes.
  2365. if ( $has_self_closer && $is_single_tag ) {
  2366. // We need some space - avoid <br/> and prefer <br />.
  2367. $pre_attribute_ws = ' ';
  2368. }
  2369. $tag = '<' . $tag . $pre_attribute_ws . $attributes . '>';
  2370. // If already queuing a close tag, then put this tag on too.
  2371. if ( ! empty( $tagqueue ) ) {
  2372. $tagqueue .= $tag;
  2373. $tag = '';
  2374. }
  2375. }
  2376. $newtext .= substr( $text, 0, $i ) . $tag;
  2377. $text = substr( $text, $i + $l );
  2378. }
  2379. // Clear Tag Queue.
  2380. $newtext .= $tagqueue;
  2381. // Add remaining text.
  2382. $newtext .= $text;
  2383. while ( $x = array_pop( $tagstack ) ) {
  2384. $newtext .= '</' . $x . '>'; // Add remaining tags to close.
  2385. }
  2386. // WP fix for the bug with HTML comments.
  2387. $newtext = str_replace( '< !--', '<!--', $newtext );
  2388. $newtext = str_replace( '< !--', '< !--', $newtext );
  2389. return $newtext;
  2390. }
  2391. /**
  2392. * Acts on text which is about to be edited.
  2393. *
  2394. * The $content is run through esc_textarea(), which uses htmlspecialchars()
  2395. * to convert special characters to HTML entities. If `$richedit` is set to true,
  2396. * it is simply a holder for the {@see 'format_to_edit'} filter.
  2397. *
  2398. * @since 0.71
  2399. * @since 4.4.0 The `$richedit` parameter was renamed to `$rich_text` for clarity.
  2400. *
  2401. * @param string $content The text about to be edited.
  2402. * @param bool $rich_text Optional. Whether `$content` should be considered rich text,
  2403. * in which case it would not be passed through esc_textarea().
  2404. * Default false.
  2405. * @return string The text after the filter (and possibly htmlspecialchars()) has been run.
  2406. */
  2407. function format_to_edit( $content, $rich_text = false ) {
  2408. /**
  2409. * Filters the text to be formatted for editing.
  2410. *
  2411. * @since 1.2.0
  2412. *
  2413. * @param string $content The text, prior to formatting for editing.
  2414. */
  2415. $content = apply_filters( 'format_to_edit', $content );
  2416. if ( ! $rich_text ) {
  2417. $content = esc_textarea( $content );
  2418. }
  2419. return $content;
  2420. }
  2421. /**
  2422. * Add leading zeros when necessary.
  2423. *
  2424. * If you set the threshold to '4' and the number is '10', then you will get
  2425. * back '0010'. If you set the threshold to '4' and the number is '5000', then you
  2426. * will get back '5000'.
  2427. *
  2428. * Uses sprintf to append the amount of zeros based on the $threshold parameter
  2429. * and the size of the number. If the number is large enough, then no zeros will
  2430. * be appended.
  2431. *
  2432. * @since 0.71
  2433. *
  2434. * @param int $number Number to append zeros to if not greater than threshold.
  2435. * @param int $threshold Digit places number needs to be to not have zeros added.
  2436. * @return string Adds leading zeros to number if needed.
  2437. */
  2438. function zeroise( $number, $threshold ) {
  2439. return sprintf( '%0' . $threshold . 's', $number );
  2440. }
  2441. /**
  2442. * Adds backslashes before letters and before a number at the start of a string.
  2443. *
  2444. * @since 0.71
  2445. *
  2446. * @param string $string Value to which backslashes will be added.
  2447. * @return string String with backslashes inserted.
  2448. */
  2449. function backslashit( $string ) {
  2450. if ( isset( $string[0] ) && $string[0] >= '0' && $string[0] <= '9' ) {
  2451. $string = '\\\\' . $string;
  2452. }
  2453. return addcslashes( $string, 'A..Za..z' );
  2454. }
  2455. /**
  2456. * Appends a trailing slash.
  2457. *
  2458. * Will remove trailing forward and backslashes if it exists already before adding
  2459. * a trailing forward slash. This prevents double slashing a string or path.
  2460. *
  2461. * The primary use of this is for paths and thus should be used for paths. It is
  2462. * not restricted to paths and offers no specific path support.
  2463. *
  2464. * @since 1.2.0
  2465. *
  2466. * @param string $string What to add the trailing slash to.
  2467. * @return string String with trailing slash added.
  2468. */
  2469. function trailingslashit( $string ) {
  2470. return untrailingslashit( $string ) . '/';
  2471. }
  2472. /**
  2473. * Removes trailing forward slashes and backslashes if they exist.
  2474. *
  2475. * The primary use of this is for paths and thus should be used for paths. It is
  2476. * not restricted to paths and offers no specific path support.
  2477. *
  2478. * @since 2.2.0
  2479. *
  2480. * @param string $string What to remove the trailing slashes from.
  2481. * @return string String without the trailing slashes.
  2482. */
  2483. function untrailingslashit( $string ) {
  2484. return rtrim( $string, '/\\' );
  2485. }
  2486. /**
  2487. * Adds slashes to escape strings.
  2488. *
  2489. * Slashes will first be removed if magic_quotes_gpc is set, see {@link
  2490. * https://secure.php.net/magic_quotes} for more details.
  2491. *
  2492. * @since 0.71
  2493. *
  2494. * @param string $gpc The string returned from HTTP request data.
  2495. * @return string Returns a string escaped with slashes.
  2496. */
  2497. function addslashes_gpc( $gpc ) {
  2498. return wp_slash( $gpc );
  2499. }
  2500. /**
  2501. * Navigates through an array, object, or scalar, and removes slashes from the values.
  2502. *
  2503. * @since 2.0.0
  2504. *
  2505. * @param mixed $value The value to be stripped.
  2506. * @return mixed Stripped value.
  2507. */
  2508. function stripslashes_deep( $value ) {
  2509. return map_deep( $value, 'stripslashes_from_strings_only' );
  2510. }
  2511. /**
  2512. * Callback function for `stripslashes_deep()` which strips slashes from strings.
  2513. *
  2514. * @since 4.4.0
  2515. *
  2516. * @param mixed $value The array or string to be stripped.
  2517. * @return mixed $value The stripped value.
  2518. */
  2519. function stripslashes_from_strings_only( $value ) {
  2520. return is_string( $value ) ? stripslashes( $value ) : $value;
  2521. }
  2522. /**
  2523. * Navigates through an array, object, or scalar, and encodes the values to be used in a URL.
  2524. *
  2525. * @since 2.2.0
  2526. *
  2527. * @param mixed $value The array or string to be encoded.
  2528. * @return mixed $value The encoded value.
  2529. */
  2530. function urlencode_deep( $value ) {
  2531. return map_deep( $value, 'urlencode' );
  2532. }
  2533. /**
  2534. * Navigates through an array, object, or scalar, and raw-encodes the values to be used in a URL.
  2535. *
  2536. * @since 3.4.0
  2537. *
  2538. * @param mixed $value The array or string to be encoded.
  2539. * @return mixed $value The encoded value.
  2540. */
  2541. function rawurlencode_deep( $value ) {
  2542. return map_deep( $value, 'rawurlencode' );
  2543. }
  2544. /**
  2545. * Navigates through an array, object, or scalar, and decodes URL-encoded values
  2546. *
  2547. * @since 4.4.0
  2548. *
  2549. * @param mixed $value The array or string to be decoded.
  2550. * @return mixed $value The decoded value.
  2551. */
  2552. function urldecode_deep( $value ) {
  2553. return map_deep( $value, 'urldecode' );
  2554. }
  2555. /**
  2556. * Converts email addresses characters to HTML entities to block spam bots.
  2557. *
  2558. * @since 0.71
  2559. *
  2560. * @param string $email_address Email address.
  2561. * @param int $hex_encoding Optional. Set to 1 to enable hex encoding.
  2562. * @return string Converted email address.
  2563. */
  2564. function antispambot( $email_address, $hex_encoding = 0 ) {
  2565. $email_no_spam_address = '';
  2566. for ( $i = 0, $len = strlen( $email_address ); $i < $len; $i++ ) {
  2567. $j = rand( 0, 1 + $hex_encoding );
  2568. if ( $j == 0 ) {
  2569. $email_no_spam_address .= '&#' . ord( $email_address[ $i ] ) . ';';
  2570. } elseif ( $j == 1 ) {
  2571. $email_no_spam_address .= $email_address[ $i ];
  2572. } elseif ( $j == 2 ) {
  2573. $email_no_spam_address .= '%' . zeroise( dechex( ord( $email_address[ $i ] ) ), 2 );
  2574. }
  2575. }
  2576. return str_replace( '@', '&#64;', $email_no_spam_address );
  2577. }
  2578. /**
  2579. * Callback to convert URI match to HTML A element.
  2580. *
  2581. * This function was backported from 2.5.0 to 2.3.2. Regex callback for make_clickable().
  2582. *
  2583. * @since 2.3.2
  2584. * @access private
  2585. *
  2586. * @param array $matches Single Regex Match.
  2587. * @return string HTML A element with URI address.
  2588. */
  2589. function _make_url_clickable_cb( $matches ) {
  2590. $url = $matches[2];
  2591. if ( ')' == $matches[3] && strpos( $url, '(' ) ) {
  2592. // If the trailing character is a closing parethesis, and the URL has an opening parenthesis in it, add the closing parenthesis to the URL.
  2593. // Then we can let the parenthesis balancer do its thing below.
  2594. $url .= $matches[3];
  2595. $suffix = '';
  2596. } else {
  2597. $suffix = $matches[3];
  2598. }
  2599. // Include parentheses in the URL only if paired
  2600. while ( substr_count( $url, '(' ) < substr_count( $url, ')' ) ) {
  2601. $suffix = strrchr( $url, ')' ) . $suffix;
  2602. $url = substr( $url, 0, strrpos( $url, ')' ) );
  2603. }
  2604. $url = esc_url( $url );
  2605. if ( empty( $url ) ) {
  2606. return $matches[0];
  2607. }
  2608. if ( 'comment_text' === current_filter() ) {
  2609. $rel = 'nofollow ugc';
  2610. } else {
  2611. $rel = 'nofollow';
  2612. }
  2613. /**
  2614. * Filters the rel value that is added to URL matches converted to links.
  2615. *
  2616. * @since 5.3.0
  2617. *
  2618. * @param string $rel The rel value.
  2619. * @param string $url The matched URL being converted to a link tag.
  2620. */
  2621. $rel = apply_filters( 'make_clickable_rel', $rel, $url );
  2622. $rel = esc_attr( $rel );
  2623. return $matches[1] . "<a href=\"$url\" rel=\"$rel\">$url</a>" . $suffix;
  2624. }
  2625. /**
  2626. * Callback to convert URL match to HTML A element.
  2627. *
  2628. * This function was backported from 2.5.0 to 2.3.2. Regex callback for make_clickable().
  2629. *
  2630. * @since 2.3.2
  2631. * @access private
  2632. *
  2633. * @param array $matches Single Regex Match.
  2634. * @return string HTML A element with URL address.
  2635. */
  2636. function _make_web_ftp_clickable_cb( $matches ) {
  2637. $ret = '';
  2638. $dest = $matches[2];
  2639. $dest = 'http://' . $dest;
  2640. // removed trailing [.,;:)] from URL
  2641. if ( in_array( substr( $dest, -1 ), array( '.', ',', ';', ':', ')' ) ) === true ) {
  2642. $ret = substr( $dest, -1 );
  2643. $dest = substr( $dest, 0, strlen( $dest ) - 1 );
  2644. }
  2645. $dest = esc_url( $dest );
  2646. if ( empty( $dest ) ) {
  2647. return $matches[0];
  2648. }
  2649. if ( 'comment_text' === current_filter() ) {
  2650. $rel = 'nofollow ugc';
  2651. } else {
  2652. $rel = 'nofollow';
  2653. }
  2654. /** This filter is documented in wp-includes/formatting.php */
  2655. $rel = apply_filters( 'make_clickable_rel', $rel, $dest );
  2656. $rel = esc_attr( $rel );
  2657. return $matches[1] . "<a href=\"$dest\" rel=\"$rel\">$dest</a>$ret";
  2658. }
  2659. /**
  2660. * Callback to convert email address match to HTML A element.
  2661. *
  2662. * This function was backported from 2.5.0 to 2.3.2. Regex callback for make_clickable().
  2663. *
  2664. * @since 2.3.2
  2665. * @access private
  2666. *
  2667. * @param array $matches Single Regex Match.
  2668. * @return string HTML A element with email address.
  2669. */
  2670. function _make_email_clickable_cb( $matches ) {
  2671. $email = $matches[2] . '@' . $matches[3];
  2672. return $matches[1] . "<a href=\"mailto:$email\">$email</a>";
  2673. }
  2674. /**
  2675. * Convert plaintext URI to HTML links.
  2676. *
  2677. * Converts URI, www and ftp, and email addresses. Finishes by fixing links
  2678. * within links.
  2679. *
  2680. * @since 0.71
  2681. *
  2682. * @param string $text Content to convert URIs.
  2683. * @return string Content with converted URIs.
  2684. */
  2685. function make_clickable( $text ) {
  2686. $r = '';
  2687. $textarr = preg_split( '/(<[^<>]+>)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // split out HTML tags
  2688. $nested_code_pre = 0; // Keep track of how many levels link is nested inside <pre> or <code>
  2689. foreach ( $textarr as $piece ) {
  2690. if ( preg_match( '|^<code[\s>]|i', $piece ) || preg_match( '|^<pre[\s>]|i', $piece ) || preg_match( '|^<script[\s>]|i', $piece ) || preg_match( '|^<style[\s>]|i', $piece ) ) {
  2691. $nested_code_pre++;
  2692. } elseif ( $nested_code_pre && ( '</code>' === strtolower( $piece ) || '</pre>' === strtolower( $piece ) || '</script>' === strtolower( $piece ) || '</style>' === strtolower( $piece ) ) ) {
  2693. $nested_code_pre--;
  2694. }
  2695. if ( $nested_code_pre || empty( $piece ) || ( $piece[0] === '<' && ! preg_match( '|^<\s*[\w]{1,20}+://|', $piece ) ) ) {
  2696. $r .= $piece;
  2697. continue;
  2698. }
  2699. // Long strings might contain expensive edge cases ...
  2700. if ( 10000 < strlen( $piece ) ) {
  2701. // ... break it up
  2702. foreach ( _split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses
  2703. if ( 2101 < strlen( $chunk ) ) {
  2704. $r .= $chunk; // Too big, no whitespace: bail.
  2705. } else {
  2706. $r .= make_clickable( $chunk );
  2707. }
  2708. }
  2709. } else {
  2710. $ret = " $piece "; // Pad with whitespace to simplify the regexes
  2711. $url_clickable = '~
  2712. ([\\s(<.,;:!?]) # 1: Leading whitespace, or punctuation
  2713. ( # 2: URL
  2714. [\\w]{1,20}+:// # Scheme and hier-part prefix
  2715. (?=\S{1,2000}\s) # Limit to URLs less than about 2000 characters long
  2716. [\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]*+ # Non-punctuation URL character
  2717. (?: # Unroll the Loop: Only allow puctuation URL character if followed by a non-punctuation URL character
  2718. [\'.,;:!?)] # Punctuation URL character
  2719. [\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]++ # Non-punctuation URL character
  2720. )*
  2721. )
  2722. (\)?) # 3: Trailing closing parenthesis (for parethesis balancing post processing)
  2723. ~xS';
  2724. // The regex is a non-anchored pattern and does not have a single fixed starting character.
  2725. // Tell PCRE to spend more time optimizing since, when used on a page load, it will probably be used several times.
  2726. $ret = preg_replace_callback( $url_clickable, '_make_url_clickable_cb', $ret );
  2727. $ret = preg_replace_callback( '#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret );
  2728. $ret = preg_replace_callback( '#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret );
  2729. $ret = substr( $ret, 1, -1 ); // Remove our whitespace padding.
  2730. $r .= $ret;
  2731. }
  2732. }
  2733. // Cleanup of accidental links within links
  2734. return preg_replace( '#(<a([ \r\n\t]+[^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i', '$1$3</a>', $r );
  2735. }
  2736. /**
  2737. * Breaks a string into chunks by splitting at whitespace characters.
  2738. * The length of each returned chunk is as close to the specified length goal as possible,
  2739. * with the caveat that each chunk includes its trailing delimiter.
  2740. * Chunks longer than the goal are guaranteed to not have any inner whitespace.
  2741. *
  2742. * Joining the returned chunks with empty delimiters reconstructs the input string losslessly.
  2743. *
  2744. * Input string must have no null characters (or eventual transformations on output chunks must not care about null characters)
  2745. *
  2746. * _split_str_by_whitespace( "1234 67890 1234 67890a cd 1234 890 123456789 1234567890a 45678 1 3 5 7 90 ", 10 ) ==
  2747. * array (
  2748. * 0 => '1234 67890 ', // 11 characters: Perfect split
  2749. * 1 => '1234 ', // 5 characters: '1234 67890a' was too long
  2750. * 2 => '67890a cd ', // 10 characters: '67890a cd 1234' was too long
  2751. * 3 => '1234 890 ', // 11 characters: Perfect split
  2752. * 4 => '123456789 ', // 10 characters: '123456789 1234567890a' was too long
  2753. * 5 => '1234567890a ', // 12 characters: Too long, but no inner whitespace on which to split
  2754. * 6 => ' 45678 ', // 11 characters: Perfect split
  2755. * 7 => '1 3 5 7 90 ', // 11 characters: End of $string
  2756. * );
  2757. *
  2758. * @since 3.4.0
  2759. * @access private
  2760. *
  2761. * @param string $string The string to split.
  2762. * @param int $goal The desired chunk length.
  2763. * @return array Numeric array of chunks.
  2764. */
  2765. function _split_str_by_whitespace( $string, $goal ) {
  2766. $chunks = array();
  2767. $string_nullspace = strtr( $string, "\r\n\t\v\f ", "\000\000\000\000\000\000" );
  2768. while ( $goal < strlen( $string_nullspace ) ) {
  2769. $pos = strrpos( substr( $string_nullspace, 0, $goal + 1 ), "\000" );
  2770. if ( false === $pos ) {
  2771. $pos = strpos( $string_nullspace, "\000", $goal + 1 );
  2772. if ( false === $pos ) {
  2773. break;
  2774. }
  2775. }
  2776. $chunks[] = substr( $string, 0, $pos + 1 );
  2777. $string = substr( $string, $pos + 1 );
  2778. $string_nullspace = substr( $string_nullspace, $pos + 1 );
  2779. }
  2780. if ( $string ) {
  2781. $chunks[] = $string;
  2782. }
  2783. return $chunks;
  2784. }
  2785. /**
  2786. * Callback to add a rel attribute to HTML A element.
  2787. *
  2788. * Will remove already existing string before adding to prevent invalidating (X)HTML.
  2789. *
  2790. * @since 5.3.0
  2791. *
  2792. * @param array $matches Single match.
  2793. * @param string $rel The rel attribute to add.
  2794. * @return string HTML A element with the added rel attribute.
  2795. */
  2796. function wp_rel_callback( $matches, $rel ) {
  2797. $text = $matches[1];
  2798. $atts = wp_kses_hair( $matches[1], wp_allowed_protocols() );
  2799. if ( ! empty( $atts['href'] ) ) {
  2800. if ( in_array( strtolower( wp_parse_url( $atts['href']['value'], PHP_URL_SCHEME ) ), array( 'http', 'https' ), true ) ) {
  2801. if ( strtolower( wp_parse_url( $atts['href']['value'], PHP_URL_HOST ) ) === strtolower( wp_parse_url( home_url(), PHP_URL_HOST ) ) ) {
  2802. return "<a $text>";
  2803. }
  2804. }
  2805. }
  2806. if ( ! empty( $atts['rel'] ) ) {
  2807. $parts = array_map( 'trim', explode( ' ', $atts['rel']['value'] ) );
  2808. $rel_array = array_map( 'trim', explode( ' ', $rel ) );
  2809. $parts = array_unique( array_merge( $parts, $rel_array ) );
  2810. $rel = implode( ' ', $parts );
  2811. unset( $atts['rel'] );
  2812. $html = '';
  2813. foreach ( $atts as $name => $value ) {
  2814. if ( isset( $value['vless'] ) && 'y' === $value['vless'] ) {
  2815. $html .= $name . ' ';
  2816. } else {
  2817. $html .= "{$name}=\"" . esc_attr( $value['value'] ) . '" ';
  2818. }
  2819. }
  2820. $text = trim( $html );
  2821. }
  2822. return "<a $text rel=\"" . esc_attr( $rel ) . '">';
  2823. }
  2824. /**
  2825. * Adds `rel="nofollow"` string to all HTML A elements in content.
  2826. *
  2827. * @since 1.5.0
  2828. *
  2829. * @param string $text Content that may contain HTML A elements.
  2830. * @return string Converted content.
  2831. */
  2832. function wp_rel_nofollow( $text ) {
  2833. // This is a pre-save filter, so text is already escaped.
  2834. $text = stripslashes( $text );
  2835. $text = preg_replace_callback(
  2836. '|<a (.+?)>|i',
  2837. function( $matches ) {
  2838. return wp_rel_callback( $matches, 'nofollow' );
  2839. },
  2840. $text
  2841. );
  2842. return wp_slash( $text );
  2843. }
  2844. /**
  2845. * Callback to add `rel="nofollow"` string to HTML A element.
  2846. *
  2847. * @since 2.3.0
  2848. * @deprecated 5.3.0 Use wp_rel_callback()
  2849. *
  2850. * @param array $matches Single match.
  2851. * @return string HTML A Element with `rel="nofollow"`.
  2852. */
  2853. function wp_rel_nofollow_callback( $matches ) {
  2854. return wp_rel_callback( $matches, 'nofollow' );
  2855. }
  2856. /**
  2857. * Adds `rel="nofollow ugc"` string to all HTML A elements in content.
  2858. *
  2859. * @since 5.3.0
  2860. *
  2861. * @param string $text Content that may contain HTML A elements.
  2862. * @return string Converted content.
  2863. */
  2864. function wp_rel_ugc( $text ) {
  2865. // This is a pre-save filter, so text is already escaped.
  2866. $text = stripslashes( $text );
  2867. $text = preg_replace_callback(
  2868. '|<a (.+?)>|i',
  2869. function( $matches ) {
  2870. return wp_rel_callback( $matches, 'nofollow ugc' );
  2871. },
  2872. $text
  2873. );
  2874. return wp_slash( $text );
  2875. }
  2876. /**
  2877. * Adds rel noreferrer and noopener to all HTML A elements that have a target.
  2878. *
  2879. * @since 5.1.0
  2880. *
  2881. * @param string $text Content that may contain HTML A elements.
  2882. * @return string Converted content.
  2883. */
  2884. function wp_targeted_link_rel( $text ) {
  2885. // Don't run (more expensive) regex if no links with targets.
  2886. if ( stripos( $text, 'target' ) !== false && stripos( $text, '<a ' ) !== false ) {
  2887. if ( ! is_serialized( $text ) ) {
  2888. $text = preg_replace_callback( '|<a\s([^>]*target\s*=[^>]*)>|i', 'wp_targeted_link_rel_callback', $text );
  2889. }
  2890. }
  2891. return $text;
  2892. }
  2893. /**
  2894. * Callback to add rel="noreferrer noopener" string to HTML A element.
  2895. *
  2896. * Will not duplicate existing noreferrer and noopener values
  2897. * to prevent from invalidating the HTML.
  2898. *
  2899. * @since 5.1.0
  2900. *
  2901. * @param array $matches Single Match
  2902. * @return string HTML A Element with rel noreferrer noopener in addition to any existing values
  2903. */
  2904. function wp_targeted_link_rel_callback( $matches ) {
  2905. $link_html = $matches[1];
  2906. $rel_match = array();
  2907. /**
  2908. * Filters the rel values that are added to links with `target` attribute.
  2909. *
  2910. * @since 5.1.0
  2911. *
  2912. * @param string $rel The rel values.
  2913. * @param string $link_html The matched content of the link tag including all HTML attributes.
  2914. */
  2915. $rel = apply_filters( 'wp_targeted_link_rel', 'noopener noreferrer', $link_html );
  2916. // Avoid additional regex if the filter removes rel values.
  2917. if ( ! $rel ) {
  2918. return "<a $link_html>";
  2919. }
  2920. // Value with delimiters, spaces around are optional.
  2921. $attr_regex = '|rel\s*=\s*?(\\\\{0,1}["\'])(.*?)\\1|i';
  2922. preg_match( $attr_regex, $link_html, $rel_match );
  2923. if ( empty( $rel_match[0] ) ) {
  2924. // No delimiters, try with a single value and spaces, because `rel = va"lue` is totally fine...
  2925. $attr_regex = '|rel\s*=(\s*)([^\s]*)|i';
  2926. preg_match( $attr_regex, $link_html, $rel_match );
  2927. }
  2928. if ( ! empty( $rel_match[0] ) ) {
  2929. $parts = preg_split( '|\s+|', strtolower( $rel_match[2] ) );
  2930. $parts = array_map( 'esc_attr', $parts );
  2931. $needed = explode( ' ', $rel );
  2932. $parts = array_unique( array_merge( $parts, $needed ) );
  2933. $delimiter = trim( $rel_match[1] ) ? $rel_match[1] : '"';
  2934. $rel = 'rel=' . $delimiter . trim( implode( ' ', $parts ) ) . $delimiter;
  2935. $link_html = str_replace( $rel_match[0], $rel, $link_html );
  2936. } elseif ( preg_match( '|target\s*=\s*?\\\\"|', $link_html ) ) {
  2937. $link_html .= " rel=\\\"$rel\\\"";
  2938. } elseif ( preg_match( '#(target|href)\s*=\s*?\'#', $link_html ) ) {
  2939. $link_html .= " rel='$rel'";
  2940. } else {
  2941. $link_html .= " rel=\"$rel\"";
  2942. }
  2943. return "<a $link_html>";
  2944. }
  2945. /**
  2946. * Adds all filters modifying the rel attribute of targeted links.
  2947. *
  2948. * @since 5.1.0
  2949. */
  2950. function wp_init_targeted_link_rel_filters() {
  2951. $filters = array(
  2952. 'title_save_pre',
  2953. 'content_save_pre',
  2954. 'excerpt_save_pre',
  2955. 'content_filtered_save_pre',
  2956. 'pre_comment_content',
  2957. 'pre_term_description',
  2958. 'pre_link_description',
  2959. 'pre_link_notes',
  2960. 'pre_user_description',
  2961. );
  2962. foreach ( $filters as $filter ) {
  2963. add_filter( $filter, 'wp_targeted_link_rel' );
  2964. };
  2965. }
  2966. /**
  2967. * Removes all filters modifying the rel attribute of targeted links.
  2968. *
  2969. * @since 5.1.0
  2970. */
  2971. function wp_remove_targeted_link_rel_filters() {
  2972. $filters = array(
  2973. 'title_save_pre',
  2974. 'content_save_pre',
  2975. 'excerpt_save_pre',
  2976. 'content_filtered_save_pre',
  2977. 'pre_comment_content',
  2978. 'pre_term_description',
  2979. 'pre_link_description',
  2980. 'pre_link_notes',
  2981. 'pre_user_description',
  2982. );
  2983. foreach ( $filters as $filter ) {
  2984. remove_filter( $filter, 'wp_targeted_link_rel' );
  2985. };
  2986. }
  2987. /**
  2988. * Convert one smiley code to the icon graphic file equivalent.
  2989. *
  2990. * Callback handler for convert_smilies().
  2991. *
  2992. * Looks up one smiley code in the $wpsmiliestrans global array and returns an
  2993. * `<img>` string for that smiley.
  2994. *
  2995. * @since 2.8.0
  2996. *
  2997. * @global array $wpsmiliestrans
  2998. *
  2999. * @param array $matches Single match. Smiley code to convert to image.
  3000. * @return string Image string for smiley.
  3001. */
  3002. function translate_smiley( $matches ) {
  3003. global $wpsmiliestrans;
  3004. if ( count( $matches ) == 0 ) {
  3005. return '';
  3006. }
  3007. $smiley = trim( reset( $matches ) );
  3008. $img = $wpsmiliestrans[ $smiley ];
  3009. $matches = array();
  3010. $ext = preg_match( '/\.([^.]+)$/', $img, $matches ) ? strtolower( $matches[1] ) : false;
  3011. $image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' );
  3012. // Don't convert smilies that aren't images - they're probably emoji.
  3013. if ( ! in_array( $ext, $image_exts ) ) {
  3014. return $img;
  3015. }
  3016. /**
  3017. * Filters the Smiley image URL before it's used in the image element.
  3018. *
  3019. * @since 2.9.0
  3020. *
  3021. * @param string $smiley_url URL for the smiley image.
  3022. * @param string $img Filename for the smiley image.
  3023. * @param string $site_url Site URL, as returned by site_url().
  3024. */
  3025. $src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() );
  3026. return sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="height: 1em; max-height: 1em;" />', esc_url( $src_url ), esc_attr( $smiley ) );
  3027. }
  3028. /**
  3029. * Convert text equivalent of smilies to images.
  3030. *
  3031. * Will only convert smilies if the option 'use_smilies' is true and the global
  3032. * used in the function isn't empty.
  3033. *
  3034. * @since 0.71
  3035. *
  3036. * @global string|array $wp_smiliessearch
  3037. *
  3038. * @param string $text Content to convert smilies from text.
  3039. * @return string Converted content with text smilies replaced with images.
  3040. */
  3041. function convert_smilies( $text ) {
  3042. global $wp_smiliessearch;
  3043. $output = '';
  3044. if ( get_option( 'use_smilies' ) && ! empty( $wp_smiliessearch ) ) {
  3045. // HTML loop taken from texturize function, could possible be consolidated
  3046. $textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // capture the tags as well as in between
  3047. $stop = count( $textarr );// loop stuff
  3048. // Ignore proessing of specific tags
  3049. $tags_to_ignore = 'code|pre|style|script|textarea';
  3050. $ignore_block_element = '';
  3051. for ( $i = 0; $i < $stop; $i++ ) {
  3052. $content = $textarr[ $i ];
  3053. // If we're in an ignore block, wait until we find its closing tag
  3054. if ( '' == $ignore_block_element && preg_match( '/^<(' . $tags_to_ignore . ')[^>]*>/', $content, $matches ) ) {
  3055. $ignore_block_element = $matches[1];
  3056. }
  3057. // If it's not a tag and not in ignore block
  3058. if ( '' == $ignore_block_element && strlen( $content ) > 0 && '<' != $content[0] ) {
  3059. $content = preg_replace_callback( $wp_smiliessearch, 'translate_smiley', $content );
  3060. }
  3061. // did we exit ignore block
  3062. if ( '' != $ignore_block_element && '</' . $ignore_block_element . '>' == $content ) {
  3063. $ignore_block_element = '';
  3064. }
  3065. $output .= $content;
  3066. }
  3067. } else {
  3068. // return default text.
  3069. $output = $text;
  3070. }
  3071. return $output;
  3072. }
  3073. /**
  3074. * Verifies that an email is valid.
  3075. *
  3076. * Does not grok i18n domains. Not RFC compliant.
  3077. *
  3078. * @since 0.71
  3079. *
  3080. * @param string $email Email address to verify.
  3081. * @param bool $deprecated Deprecated.
  3082. * @return string|false Valid email address on success, false on failure.
  3083. */
  3084. function is_email( $email, $deprecated = false ) {
  3085. if ( ! empty( $deprecated ) ) {
  3086. _deprecated_argument( __FUNCTION__, '3.0.0' );
  3087. }
  3088. // Test for the minimum length the email can be
  3089. if ( strlen( $email ) < 6 ) {
  3090. /**
  3091. * Filters whether an email address is valid.
  3092. *
  3093. * This filter is evaluated under several different contexts, such as 'email_too_short',
  3094. * 'email_no_at', 'local_invalid_chars', 'domain_period_sequence', 'domain_period_limits',
  3095. * 'domain_no_periods', 'sub_hyphen_limits', 'sub_invalid_chars', or no specific context.
  3096. *
  3097. * @since 2.8.0
  3098. *
  3099. * @param string|false $is_email The email address if successfully passed the is_email() checks, false otherwise.
  3100. * @param string $email The email address being checked.
  3101. * @param string $context Context under which the email was tested.
  3102. */
  3103. return apply_filters( 'is_email', false, $email, 'email_too_short' );
  3104. }
  3105. // Test for an @ character after the first position
  3106. if ( strpos( $email, '@', 1 ) === false ) {
  3107. /** This filter is documented in wp-includes/formatting.php */
  3108. return apply_filters( 'is_email', false, $email, 'email_no_at' );
  3109. }
  3110. // Split out the local and domain parts
  3111. list( $local, $domain ) = explode( '@', $email, 2 );
  3112. // LOCAL PART
  3113. // Test for invalid characters
  3114. if ( ! preg_match( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', $local ) ) {
  3115. /** This filter is documented in wp-includes/formatting.php */
  3116. return apply_filters( 'is_email', false, $email, 'local_invalid_chars' );
  3117. }
  3118. // DOMAIN PART
  3119. // Test for sequences of periods
  3120. if ( preg_match( '/\.{2,}/', $domain ) ) {
  3121. /** This filter is documented in wp-includes/formatting.php */
  3122. return apply_filters( 'is_email', false, $email, 'domain_period_sequence' );
  3123. }
  3124. // Test for leading and trailing periods and whitespace
  3125. if ( trim( $domain, " \t\n\r\0\x0B." ) !== $domain ) {
  3126. /** This filter is documented in wp-includes/formatting.php */
  3127. return apply_filters( 'is_email', false, $email, 'domain_period_limits' );
  3128. }
  3129. // Split the domain into subs
  3130. $subs = explode( '.', $domain );
  3131. // Assume the domain will have at least two subs
  3132. if ( 2 > count( $subs ) ) {
  3133. /** This filter is documented in wp-includes/formatting.php */
  3134. return apply_filters( 'is_email', false, $email, 'domain_no_periods' );
  3135. }
  3136. // Loop through each sub
  3137. foreach ( $subs as $sub ) {
  3138. // Test for leading and trailing hyphens and whitespace
  3139. if ( trim( $sub, " \t\n\r\0\x0B-" ) !== $sub ) {
  3140. /** This filter is documented in wp-includes/formatting.php */
  3141. return apply_filters( 'is_email', false, $email, 'sub_hyphen_limits' );
  3142. }
  3143. // Test for invalid characters
  3144. if ( ! preg_match( '/^[a-z0-9-]+$/i', $sub ) ) {
  3145. /** This filter is documented in wp-includes/formatting.php */
  3146. return apply_filters( 'is_email', false, $email, 'sub_invalid_chars' );
  3147. }
  3148. }
  3149. // Congratulations your email made it!
  3150. /** This filter is documented in wp-includes/formatting.php */
  3151. return apply_filters( 'is_email', $email, $email, null );
  3152. }
  3153. /**
  3154. * Convert to ASCII from email subjects.
  3155. *
  3156. * @since 1.2.0
  3157. *
  3158. * @param string $string Subject line
  3159. * @return string Converted string to ASCII
  3160. */
  3161. function wp_iso_descrambler( $string ) {
  3162. /* this may only work with iso-8859-1, I'm afraid */
  3163. if ( ! preg_match( '#\=\?(.+)\?Q\?(.+)\?\=#i', $string, $matches ) ) {
  3164. return $string;
  3165. } else {
  3166. $subject = str_replace( '_', ' ', $matches[2] );
  3167. return preg_replace_callback( '#\=([0-9a-f]{2})#i', '_wp_iso_convert', $subject );
  3168. }
  3169. }
  3170. /**
  3171. * Helper function to convert hex encoded chars to ASCII
  3172. *
  3173. * @since 3.1.0
  3174. * @access private
  3175. *
  3176. * @param array $match The preg_replace_callback matches array
  3177. * @return string Converted chars
  3178. */
  3179. function _wp_iso_convert( $match ) {
  3180. return chr( hexdec( strtolower( $match[1] ) ) );
  3181. }
  3182. /**
  3183. * Returns a date in the GMT equivalent.
  3184. *
  3185. * Requires and returns a date in the Y-m-d H:i:s format.
  3186. * Return format can be overridden using the $format parameter.
  3187. *
  3188. * @since 1.2.0
  3189. *
  3190. * @param string $string The date to be converted.
  3191. * @param string $format The format string for the returned date. Default 'Y-m-d H:i:s'.
  3192. * @return string GMT version of the date provided.
  3193. */
  3194. function get_gmt_from_date( $string, $format = 'Y-m-d H:i:s' ) {
  3195. $datetime = date_create( $string, wp_timezone() );
  3196. if ( false === $datetime ) {
  3197. return gmdate( $format, 0 );
  3198. }
  3199. return $datetime->setTimezone( new DateTimeZone( 'UTC' ) )->format( $format );
  3200. }
  3201. /**
  3202. * Converts a GMT date into the correct format for the blog.
  3203. *
  3204. * Requires and returns a date in the Y-m-d H:i:s format.
  3205. * Return format can be overridden using the $format parameter.
  3206. *
  3207. * @since 1.2.0
  3208. *
  3209. * @param string $string The date to be converted.
  3210. * @param string $format The format string for the returned date. Default 'Y-m-d H:i:s'.
  3211. * @return string Formatted date relative to the timezone.
  3212. */
  3213. function get_date_from_gmt( $string, $format = 'Y-m-d H:i:s' ) {
  3214. $datetime = date_create( $string, new DateTimeZone( 'UTC' ) );
  3215. if ( false === $datetime ) {
  3216. return gmdate( $format, 0 );
  3217. }
  3218. return $datetime->setTimezone( wp_timezone() )->format( $format );
  3219. }
  3220. /**
  3221. * Computes an offset in seconds from an iso8601 timezone.
  3222. *
  3223. * @since 1.5.0
  3224. *
  3225. * @param string $timezone Either 'Z' for 0 offset or '±hhmm'.
  3226. * @return int|float The offset in seconds.
  3227. */
  3228. function iso8601_timezone_to_offset( $timezone ) {
  3229. // $timezone is either 'Z' or '[+|-]hhmm'
  3230. if ( $timezone == 'Z' ) {
  3231. $offset = 0;
  3232. } else {
  3233. $sign = ( substr( $timezone, 0, 1 ) == '+' ) ? 1 : -1;
  3234. $hours = intval( substr( $timezone, 1, 2 ) );
  3235. $minutes = intval( substr( $timezone, 3, 4 ) ) / 60;
  3236. $offset = $sign * HOUR_IN_SECONDS * ( $hours + $minutes );
  3237. }
  3238. return $offset;
  3239. }
  3240. /**
  3241. * Converts an iso8601 (Ymd\TH:i:sO) date to MySQL DateTime (Y-m-d H:i:s) format used by post_date[_gmt].
  3242. *
  3243. * @since 1.5.0
  3244. *
  3245. * @param string $date_string Date and time in ISO 8601 format {@link https://en.wikipedia.org/wiki/ISO_8601}.
  3246. * @param string $timezone Optional. If set to 'gmt' returns the result in UTC. Default 'user'.
  3247. * @return string|bool The date and time in MySQL DateTime format - Y-m-d H:i:s, or false on failure.
  3248. */
  3249. function iso8601_to_datetime( $date_string, $timezone = 'user' ) {
  3250. $timezone = strtolower( $timezone );
  3251. $wp_timezone = wp_timezone();
  3252. $datetime = date_create( $date_string, $wp_timezone ); // Timezone is ignored if input has one.
  3253. if ( false === $datetime ) {
  3254. return false;
  3255. }
  3256. if ( 'gmt' === $timezone ) {
  3257. return $datetime->setTimezone( new DateTimeZone( 'UTC' ) )->format( 'Y-m-d H:i:s' );
  3258. }
  3259. if ( 'user' === $timezone ) {
  3260. return $datetime->setTimezone( $wp_timezone )->format( 'Y-m-d H:i:s' );
  3261. }
  3262. return false;
  3263. }
  3264. /**
  3265. * Strips out all characters that are not allowable in an email.
  3266. *
  3267. * @since 1.5.0
  3268. *
  3269. * @param string $email Email address to filter.
  3270. * @return string Filtered email address.
  3271. */
  3272. function sanitize_email( $email ) {
  3273. // Test for the minimum length the email can be
  3274. if ( strlen( $email ) < 6 ) {
  3275. /**
  3276. * Filters a sanitized email address.
  3277. *
  3278. * This filter is evaluated under several contexts, including 'email_too_short',
  3279. * 'email_no_at', 'local_invalid_chars', 'domain_period_sequence', 'domain_period_limits',
  3280. * 'domain_no_periods', 'domain_no_valid_subs', or no context.
  3281. *
  3282. * @since 2.8.0
  3283. *
  3284. * @param string $sanitized_email The sanitized email address.
  3285. * @param string $email The email address, as provided to sanitize_email().
  3286. * @param string|null $message A message to pass to the user. null if email is sanitized.
  3287. */
  3288. return apply_filters( 'sanitize_email', '', $email, 'email_too_short' );
  3289. }
  3290. // Test for an @ character after the first position
  3291. if ( strpos( $email, '@', 1 ) === false ) {
  3292. /** This filter is documented in wp-includes/formatting.php */
  3293. return apply_filters( 'sanitize_email', '', $email, 'email_no_at' );
  3294. }
  3295. // Split out the local and domain parts
  3296. list( $local, $domain ) = explode( '@', $email, 2 );
  3297. // LOCAL PART
  3298. // Test for invalid characters
  3299. $local = preg_replace( '/[^a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]/', '', $local );
  3300. if ( '' === $local ) {
  3301. /** This filter is documented in wp-includes/formatting.php */
  3302. return apply_filters( 'sanitize_email', '', $email, 'local_invalid_chars' );
  3303. }
  3304. // DOMAIN PART
  3305. // Test for sequences of periods
  3306. $domain = preg_replace( '/\.{2,}/', '', $domain );
  3307. if ( '' === $domain ) {
  3308. /** This filter is documented in wp-includes/formatting.php */
  3309. return apply_filters( 'sanitize_email', '', $email, 'domain_period_sequence' );
  3310. }
  3311. // Test for leading and trailing periods and whitespace
  3312. $domain = trim( $domain, " \t\n\r\0\x0B." );
  3313. if ( '' === $domain ) {
  3314. /** This filter is documented in wp-includes/formatting.php */
  3315. return apply_filters( 'sanitize_email', '', $email, 'domain_period_limits' );
  3316. }
  3317. // Split the domain into subs
  3318. $subs = explode( '.', $domain );
  3319. // Assume the domain will have at least two subs
  3320. if ( 2 > count( $subs ) ) {
  3321. /** This filter is documented in wp-includes/formatting.php */
  3322. return apply_filters( 'sanitize_email', '', $email, 'domain_no_periods' );
  3323. }
  3324. // Create an array that will contain valid subs
  3325. $new_subs = array();
  3326. // Loop through each sub
  3327. foreach ( $subs as $sub ) {
  3328. // Test for leading and trailing hyphens
  3329. $sub = trim( $sub, " \t\n\r\0\x0B-" );
  3330. // Test for invalid characters
  3331. $sub = preg_replace( '/[^a-z0-9-]+/i', '', $sub );
  3332. // If there's anything left, add it to the valid subs
  3333. if ( '' !== $sub ) {
  3334. $new_subs[] = $sub;
  3335. }
  3336. }
  3337. // If there aren't 2 or more valid subs
  3338. if ( 2 > count( $new_subs ) ) {
  3339. /** This filter is documented in wp-includes/formatting.php */
  3340. return apply_filters( 'sanitize_email', '', $email, 'domain_no_valid_subs' );
  3341. }
  3342. // Join valid subs into the new domain
  3343. $domain = join( '.', $new_subs );
  3344. // Put the email back together
  3345. $sanitized_email = $local . '@' . $domain;
  3346. // Congratulations your email made it!
  3347. /** This filter is documented in wp-includes/formatting.php */
  3348. return apply_filters( 'sanitize_email', $sanitized_email, $email, null );
  3349. }
  3350. /**
  3351. * Determines the difference between two timestamps.
  3352. *
  3353. * The difference is returned in a human readable format such as "1 hour",
  3354. * "5 mins", "2 days".
  3355. *
  3356. * @since 1.5.0
  3357. * @since 5.3.0 Added support for showing a difference in seconds.
  3358. *
  3359. * @param int $from Unix timestamp from which the difference begins.
  3360. * @param int $to Optional. Unix timestamp to end the time difference. Default becomes time() if not set.
  3361. * @return string Human readable time difference.
  3362. */
  3363. function human_time_diff( $from, $to = 0 ) {
  3364. if ( empty( $to ) ) {
  3365. $to = time();
  3366. }
  3367. $diff = (int) abs( $to - $from );
  3368. if ( $diff < MINUTE_IN_SECONDS ) {
  3369. $secs = $diff;
  3370. if ( $secs <= 1 ) {
  3371. $secs = 1;
  3372. }
  3373. /* translators: Time difference between two dates, in seconds. %s: Number of seconds. */
  3374. $since = sprintf( _n( '%s second', '%s seconds', $secs ), $secs );
  3375. } elseif ( $diff < HOUR_IN_SECONDS && $diff >= MINUTE_IN_SECONDS ) {
  3376. $mins = round( $diff / MINUTE_IN_SECONDS );
  3377. if ( $mins <= 1 ) {
  3378. $mins = 1;
  3379. }
  3380. /* translators: Time difference between two dates, in minutes (min=minute). %s: Number of minutes. */
  3381. $since = sprintf( _n( '%s min', '%s mins', $mins ), $mins );
  3382. } elseif ( $diff < DAY_IN_SECONDS && $diff >= HOUR_IN_SECONDS ) {
  3383. $hours = round( $diff / HOUR_IN_SECONDS );
  3384. if ( $hours <= 1 ) {
  3385. $hours = 1;
  3386. }
  3387. /* translators: Time difference between two dates, in hours. %s: Number of hours. */
  3388. $since = sprintf( _n( '%s hour', '%s hours', $hours ), $hours );
  3389. } elseif ( $diff < WEEK_IN_SECONDS && $diff >= DAY_IN_SECONDS ) {
  3390. $days = round( $diff / DAY_IN_SECONDS );
  3391. if ( $days <= 1 ) {
  3392. $days = 1;
  3393. }
  3394. /* translators: Time difference between two dates, in days. %s: Number of days. */
  3395. $since = sprintf( _n( '%s day', '%s days', $days ), $days );
  3396. } elseif ( $diff < MONTH_IN_SECONDS && $diff >= WEEK_IN_SECONDS ) {
  3397. $weeks = round( $diff / WEEK_IN_SECONDS );
  3398. if ( $weeks <= 1 ) {
  3399. $weeks = 1;
  3400. }
  3401. /* translators: Time difference between two dates, in weeks. %s: Number of weeks. */
  3402. $since = sprintf( _n( '%s week', '%s weeks', $weeks ), $weeks );
  3403. } elseif ( $diff < YEAR_IN_SECONDS && $diff >= MONTH_IN_SECONDS ) {
  3404. $months = round( $diff / MONTH_IN_SECONDS );
  3405. if ( $months <= 1 ) {
  3406. $months = 1;
  3407. }
  3408. /* translators: Time difference between two dates, in months. %s: Number of months. */
  3409. $since = sprintf( _n( '%s month', '%s months', $months ), $months );
  3410. } elseif ( $diff >= YEAR_IN_SECONDS ) {
  3411. $years = round( $diff / YEAR_IN_SECONDS );
  3412. if ( $years <= 1 ) {
  3413. $years = 1;
  3414. }
  3415. /* translators: Time difference between two dates, in years. %s: Number of years. */
  3416. $since = sprintf( _n( '%s year', '%s years', $years ), $years );
  3417. }
  3418. /**
  3419. * Filters the human readable difference between two timestamps.
  3420. *
  3421. * @since 4.0.0
  3422. *
  3423. * @param string $since The difference in human readable text.
  3424. * @param int $diff The difference in seconds.
  3425. * @param int $from Unix timestamp from which the difference begins.
  3426. * @param int $to Unix timestamp to end the time difference.
  3427. */
  3428. return apply_filters( 'human_time_diff', $since, $diff, $from, $to );
  3429. }
  3430. /**
  3431. * Generates an excerpt from the content, if needed.
  3432. *
  3433. * Returns a maximum of 55 words with an ellipsis appended if necessary.
  3434. *
  3435. * The 55 word limit can be modified by plugins/themes using the {@see 'excerpt_length'} filter
  3436. * The ' [&hellip;]' string can be modified by plugins/themes using the {@see 'excerpt_more'} filter
  3437. *
  3438. * @since 1.5.0
  3439. * @since 5.2.0 Added the `$post` parameter.
  3440. *
  3441. * @param string $text Optional. The excerpt. If set to empty, an excerpt is generated.
  3442. * @param WP_Post|object|int $post Optional. WP_Post instance or Post ID/object. Default is null.
  3443. * @return string The excerpt.
  3444. */
  3445. function wp_trim_excerpt( $text = '', $post = null ) {
  3446. $raw_excerpt = $text;
  3447. if ( '' == $text ) {
  3448. $post = get_post( $post );
  3449. $text = get_the_content( '', false, $post );
  3450. $text = strip_shortcodes( $text );
  3451. $text = excerpt_remove_blocks( $text );
  3452. /** This filter is documented in wp-includes/post-template.php */
  3453. $text = apply_filters( 'the_content', $text );
  3454. $text = str_replace( ']]>', ']]&gt;', $text );
  3455. /* translators: Maximum number of words used in a post excerpt. */
  3456. $excerpt_length = intval( _x( '55', 'excerpt_length' ) );
  3457. /**
  3458. * Filters the maximum number of words in a post excerpt.
  3459. *
  3460. * @since 2.7.0
  3461. *
  3462. * @param int $number The maximum number of words. Default 55.
  3463. */
  3464. $excerpt_length = (int) apply_filters( 'excerpt_length', $excerpt_length );
  3465. /**
  3466. * Filters the string in the "more" link displayed after a trimmed excerpt.
  3467. *
  3468. * @since 2.9.0
  3469. *
  3470. * @param string $more_string The string shown within the more link.
  3471. */
  3472. $excerpt_more = apply_filters( 'excerpt_more', ' ' . '[&hellip;]' );
  3473. $text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
  3474. }
  3475. /**
  3476. * Filters the trimmed excerpt string.
  3477. *
  3478. * @since 2.8.0
  3479. *
  3480. * @param string $text The trimmed text.
  3481. * @param string $raw_excerpt The text prior to trimming.
  3482. */
  3483. return apply_filters( 'wp_trim_excerpt', $text, $raw_excerpt );
  3484. }
  3485. /**
  3486. * Trims text to a certain number of words.
  3487. *
  3488. * This function is localized. For languages that count 'words' by the individual
  3489. * character (such as East Asian languages), the $num_words argument will apply
  3490. * to the number of individual characters.
  3491. *
  3492. * @since 3.3.0
  3493. *
  3494. * @param string $text Text to trim.
  3495. * @param int $num_words Number of words. Default 55.
  3496. * @param string $more Optional. What to append if $text needs to be trimmed. Default '&hellip;'.
  3497. * @return string Trimmed text.
  3498. */
  3499. function wp_trim_words( $text, $num_words = 55, $more = null ) {
  3500. if ( null === $more ) {
  3501. $more = __( '&hellip;' );
  3502. }
  3503. $original_text = $text;
  3504. $text = wp_strip_all_tags( $text );
  3505. $num_words = (int) $num_words;
  3506. /*
  3507. * translators: If your word count is based on single characters (e.g. East Asian characters),
  3508. * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
  3509. * Do not translate into your own language.
  3510. */
  3511. if ( strpos( _x( 'words', 'Word count type. Do not translate!' ), 'characters' ) === 0 && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) {
  3512. $text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' );
  3513. preg_match_all( '/./u', $text, $words_array );
  3514. $words_array = array_slice( $words_array[0], 0, $num_words + 1 );
  3515. $sep = '';
  3516. } else {
  3517. $words_array = preg_split( "/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY );
  3518. $sep = ' ';
  3519. }
  3520. if ( count( $words_array ) > $num_words ) {
  3521. array_pop( $words_array );
  3522. $text = implode( $sep, $words_array );
  3523. $text = $text . $more;
  3524. } else {
  3525. $text = implode( $sep, $words_array );
  3526. }
  3527. /**
  3528. * Filters the text content after words have been trimmed.
  3529. *
  3530. * @since 3.3.0
  3531. *
  3532. * @param string $text The trimmed text.
  3533. * @param int $num_words The number of words to trim the text to. Default 55.
  3534. * @param string $more An optional string to append to the end of the trimmed text, e.g. &hellip;.
  3535. * @param string $original_text The text before it was trimmed.
  3536. */
  3537. return apply_filters( 'wp_trim_words', $text, $num_words, $more, $original_text );
  3538. }
  3539. /**
  3540. * Converts named entities into numbered entities.
  3541. *
  3542. * @since 1.5.1
  3543. *
  3544. * @param string $text The text within which entities will be converted.
  3545. * @return string Text with converted entities.
  3546. */
  3547. function ent2ncr( $text ) {
  3548. /**
  3549. * Filters text before named entities are converted into numbered entities.
  3550. *
  3551. * A non-null string must be returned for the filter to be evaluated.
  3552. *
  3553. * @since 3.3.0
  3554. *
  3555. * @param string|null $converted_text The text to be converted. Default null.
  3556. * @param string $text The text prior to entity conversion.
  3557. */
  3558. $filtered = apply_filters( 'pre_ent2ncr', null, $text );
  3559. if ( null !== $filtered ) {
  3560. return $filtered;
  3561. }
  3562. $to_ncr = array(
  3563. '&quot;' => '&#34;',
  3564. '&amp;' => '&#38;',
  3565. '&lt;' => '&#60;',
  3566. '&gt;' => '&#62;',
  3567. '|' => '&#124;',
  3568. '&nbsp;' => '&#160;',
  3569. '&iexcl;' => '&#161;',
  3570. '&cent;' => '&#162;',
  3571. '&pound;' => '&#163;',
  3572. '&curren;' => '&#164;',
  3573. '&yen;' => '&#165;',
  3574. '&brvbar;' => '&#166;',
  3575. '&brkbar;' => '&#166;',
  3576. '&sect;' => '&#167;',
  3577. '&uml;' => '&#168;',
  3578. '&die;' => '&#168;',
  3579. '&copy;' => '&#169;',
  3580. '&ordf;' => '&#170;',
  3581. '&laquo;' => '&#171;',
  3582. '&not;' => '&#172;',
  3583. '&shy;' => '&#173;',
  3584. '&reg;' => '&#174;',
  3585. '&macr;' => '&#175;',
  3586. '&hibar;' => '&#175;',
  3587. '&deg;' => '&#176;',
  3588. '&plusmn;' => '&#177;',
  3589. '&sup2;' => '&#178;',
  3590. '&sup3;' => '&#179;',
  3591. '&acute;' => '&#180;',
  3592. '&micro;' => '&#181;',
  3593. '&para;' => '&#182;',
  3594. '&middot;' => '&#183;',
  3595. '&cedil;' => '&#184;',
  3596. '&sup1;' => '&#185;',
  3597. '&ordm;' => '&#186;',
  3598. '&raquo;' => '&#187;',
  3599. '&frac14;' => '&#188;',
  3600. '&frac12;' => '&#189;',
  3601. '&frac34;' => '&#190;',
  3602. '&iquest;' => '&#191;',
  3603. '&Agrave;' => '&#192;',
  3604. '&Aacute;' => '&#193;',
  3605. '&Acirc;' => '&#194;',
  3606. '&Atilde;' => '&#195;',
  3607. '&Auml;' => '&#196;',
  3608. '&Aring;' => '&#197;',
  3609. '&AElig;' => '&#198;',
  3610. '&Ccedil;' => '&#199;',
  3611. '&Egrave;' => '&#200;',
  3612. '&Eacute;' => '&#201;',
  3613. '&Ecirc;' => '&#202;',
  3614. '&Euml;' => '&#203;',
  3615. '&Igrave;' => '&#204;',
  3616. '&Iacute;' => '&#205;',
  3617. '&Icirc;' => '&#206;',
  3618. '&Iuml;' => '&#207;',
  3619. '&ETH;' => '&#208;',
  3620. '&Ntilde;' => '&#209;',
  3621. '&Ograve;' => '&#210;',
  3622. '&Oacute;' => '&#211;',
  3623. '&Ocirc;' => '&#212;',
  3624. '&Otilde;' => '&#213;',
  3625. '&Ouml;' => '&#214;',
  3626. '&times;' => '&#215;',
  3627. '&Oslash;' => '&#216;',
  3628. '&Ugrave;' => '&#217;',
  3629. '&Uacute;' => '&#218;',
  3630. '&Ucirc;' => '&#219;',
  3631. '&Uuml;' => '&#220;',
  3632. '&Yacute;' => '&#221;',
  3633. '&THORN;' => '&#222;',
  3634. '&szlig;' => '&#223;',
  3635. '&agrave;' => '&#224;',
  3636. '&aacute;' => '&#225;',
  3637. '&acirc;' => '&#226;',
  3638. '&atilde;' => '&#227;',
  3639. '&auml;' => '&#228;',
  3640. '&aring;' => '&#229;',
  3641. '&aelig;' => '&#230;',
  3642. '&ccedil;' => '&#231;',
  3643. '&egrave;' => '&#232;',
  3644. '&eacute;' => '&#233;',
  3645. '&ecirc;' => '&#234;',
  3646. '&euml;' => '&#235;',
  3647. '&igrave;' => '&#236;',
  3648. '&iacute;' => '&#237;',
  3649. '&icirc;' => '&#238;',
  3650. '&iuml;' => '&#239;',
  3651. '&eth;' => '&#240;',
  3652. '&ntilde;' => '&#241;',
  3653. '&ograve;' => '&#242;',
  3654. '&oacute;' => '&#243;',
  3655. '&ocirc;' => '&#244;',
  3656. '&otilde;' => '&#245;',
  3657. '&ouml;' => '&#246;',
  3658. '&divide;' => '&#247;',
  3659. '&oslash;' => '&#248;',
  3660. '&ugrave;' => '&#249;',
  3661. '&uacute;' => '&#250;',
  3662. '&ucirc;' => '&#251;',
  3663. '&uuml;' => '&#252;',
  3664. '&yacute;' => '&#253;',
  3665. '&thorn;' => '&#254;',
  3666. '&yuml;' => '&#255;',
  3667. '&OElig;' => '&#338;',
  3668. '&oelig;' => '&#339;',
  3669. '&Scaron;' => '&#352;',
  3670. '&scaron;' => '&#353;',
  3671. '&Yuml;' => '&#376;',
  3672. '&fnof;' => '&#402;',
  3673. '&circ;' => '&#710;',
  3674. '&tilde;' => '&#732;',
  3675. '&Alpha;' => '&#913;',
  3676. '&Beta;' => '&#914;',
  3677. '&Gamma;' => '&#915;',
  3678. '&Delta;' => '&#916;',
  3679. '&Epsilon;' => '&#917;',
  3680. '&Zeta;' => '&#918;',
  3681. '&Eta;' => '&#919;',
  3682. '&Theta;' => '&#920;',
  3683. '&Iota;' => '&#921;',
  3684. '&Kappa;' => '&#922;',
  3685. '&Lambda;' => '&#923;',
  3686. '&Mu;' => '&#924;',
  3687. '&Nu;' => '&#925;',
  3688. '&Xi;' => '&#926;',
  3689. '&Omicron;' => '&#927;',
  3690. '&Pi;' => '&#928;',
  3691. '&Rho;' => '&#929;',
  3692. '&Sigma;' => '&#931;',
  3693. '&Tau;' => '&#932;',
  3694. '&Upsilon;' => '&#933;',
  3695. '&Phi;' => '&#934;',
  3696. '&Chi;' => '&#935;',
  3697. '&Psi;' => '&#936;',
  3698. '&Omega;' => '&#937;',
  3699. '&alpha;' => '&#945;',
  3700. '&beta;' => '&#946;',
  3701. '&gamma;' => '&#947;',
  3702. '&delta;' => '&#948;',
  3703. '&epsilon;' => '&#949;',
  3704. '&zeta;' => '&#950;',
  3705. '&eta;' => '&#951;',
  3706. '&theta;' => '&#952;',
  3707. '&iota;' => '&#953;',
  3708. '&kappa;' => '&#954;',
  3709. '&lambda;' => '&#955;',
  3710. '&mu;' => '&#956;',
  3711. '&nu;' => '&#957;',
  3712. '&xi;' => '&#958;',
  3713. '&omicron;' => '&#959;',
  3714. '&pi;' => '&#960;',
  3715. '&rho;' => '&#961;',
  3716. '&sigmaf;' => '&#962;',
  3717. '&sigma;' => '&#963;',
  3718. '&tau;' => '&#964;',
  3719. '&upsilon;' => '&#965;',
  3720. '&phi;' => '&#966;',
  3721. '&chi;' => '&#967;',
  3722. '&psi;' => '&#968;',
  3723. '&omega;' => '&#969;',
  3724. '&thetasym;' => '&#977;',
  3725. '&upsih;' => '&#978;',
  3726. '&piv;' => '&#982;',
  3727. '&ensp;' => '&#8194;',
  3728. '&emsp;' => '&#8195;',
  3729. '&thinsp;' => '&#8201;',
  3730. '&zwnj;' => '&#8204;',
  3731. '&zwj;' => '&#8205;',
  3732. '&lrm;' => '&#8206;',
  3733. '&rlm;' => '&#8207;',
  3734. '&ndash;' => '&#8211;',
  3735. '&mdash;' => '&#8212;',
  3736. '&lsquo;' => '&#8216;',
  3737. '&rsquo;' => '&#8217;',
  3738. '&sbquo;' => '&#8218;',
  3739. '&ldquo;' => '&#8220;',
  3740. '&rdquo;' => '&#8221;',
  3741. '&bdquo;' => '&#8222;',
  3742. '&dagger;' => '&#8224;',
  3743. '&Dagger;' => '&#8225;',
  3744. '&bull;' => '&#8226;',
  3745. '&hellip;' => '&#8230;',
  3746. '&permil;' => '&#8240;',
  3747. '&prime;' => '&#8242;',
  3748. '&Prime;' => '&#8243;',
  3749. '&lsaquo;' => '&#8249;',
  3750. '&rsaquo;' => '&#8250;',
  3751. '&oline;' => '&#8254;',
  3752. '&frasl;' => '&#8260;',
  3753. '&euro;' => '&#8364;',
  3754. '&image;' => '&#8465;',
  3755. '&weierp;' => '&#8472;',
  3756. '&real;' => '&#8476;',
  3757. '&trade;' => '&#8482;',
  3758. '&alefsym;' => '&#8501;',
  3759. '&crarr;' => '&#8629;',
  3760. '&lArr;' => '&#8656;',
  3761. '&uArr;' => '&#8657;',
  3762. '&rArr;' => '&#8658;',
  3763. '&dArr;' => '&#8659;',
  3764. '&hArr;' => '&#8660;',
  3765. '&forall;' => '&#8704;',
  3766. '&part;' => '&#8706;',
  3767. '&exist;' => '&#8707;',
  3768. '&empty;' => '&#8709;',
  3769. '&nabla;' => '&#8711;',
  3770. '&isin;' => '&#8712;',
  3771. '&notin;' => '&#8713;',
  3772. '&ni;' => '&#8715;',
  3773. '&prod;' => '&#8719;',
  3774. '&sum;' => '&#8721;',
  3775. '&minus;' => '&#8722;',
  3776. '&lowast;' => '&#8727;',
  3777. '&radic;' => '&#8730;',
  3778. '&prop;' => '&#8733;',
  3779. '&infin;' => '&#8734;',
  3780. '&ang;' => '&#8736;',
  3781. '&and;' => '&#8743;',
  3782. '&or;' => '&#8744;',
  3783. '&cap;' => '&#8745;',
  3784. '&cup;' => '&#8746;',
  3785. '&int;' => '&#8747;',
  3786. '&there4;' => '&#8756;',
  3787. '&sim;' => '&#8764;',
  3788. '&cong;' => '&#8773;',
  3789. '&asymp;' => '&#8776;',
  3790. '&ne;' => '&#8800;',
  3791. '&equiv;' => '&#8801;',
  3792. '&le;' => '&#8804;',
  3793. '&ge;' => '&#8805;',
  3794. '&sub;' => '&#8834;',
  3795. '&sup;' => '&#8835;',
  3796. '&nsub;' => '&#8836;',
  3797. '&sube;' => '&#8838;',
  3798. '&supe;' => '&#8839;',
  3799. '&oplus;' => '&#8853;',
  3800. '&otimes;' => '&#8855;',
  3801. '&perp;' => '&#8869;',
  3802. '&sdot;' => '&#8901;',
  3803. '&lceil;' => '&#8968;',
  3804. '&rceil;' => '&#8969;',
  3805. '&lfloor;' => '&#8970;',
  3806. '&rfloor;' => '&#8971;',
  3807. '&lang;' => '&#9001;',
  3808. '&rang;' => '&#9002;',
  3809. '&larr;' => '&#8592;',
  3810. '&uarr;' => '&#8593;',
  3811. '&rarr;' => '&#8594;',
  3812. '&darr;' => '&#8595;',
  3813. '&harr;' => '&#8596;',
  3814. '&loz;' => '&#9674;',
  3815. '&spades;' => '&#9824;',
  3816. '&clubs;' => '&#9827;',
  3817. '&hearts;' => '&#9829;',
  3818. '&diams;' => '&#9830;',
  3819. );
  3820. return str_replace( array_keys( $to_ncr ), array_values( $to_ncr ), $text );
  3821. }
  3822. /**
  3823. * Formats text for the editor.
  3824. *
  3825. * Generally the browsers treat everything inside a textarea as text, but
  3826. * it is still a good idea to HTML entity encode `<`, `>` and `&` in the content.
  3827. *
  3828. * The filter {@see 'format_for_editor'} is applied here. If `$text` is empty the
  3829. * filter will be applied to an empty string.
  3830. *
  3831. * @since 4.3.0
  3832. *
  3833. * @see _WP_Editors::editor()
  3834. *
  3835. * @param string $text The text to be formatted.
  3836. * @param string $default_editor The default editor for the current user.
  3837. * It is usually either 'html' or 'tinymce'.
  3838. * @return string The formatted text after filter is applied.
  3839. */
  3840. function format_for_editor( $text, $default_editor = null ) {
  3841. if ( $text ) {
  3842. $text = htmlspecialchars( $text, ENT_NOQUOTES, get_option( 'blog_charset' ) );
  3843. }
  3844. /**
  3845. * Filters the text after it is formatted for the editor.
  3846. *
  3847. * @since 4.3.0
  3848. *
  3849. * @param string $text The formatted text.
  3850. * @param string $default_editor The default editor for the current user.
  3851. * It is usually either 'html' or 'tinymce'.
  3852. */
  3853. return apply_filters( 'format_for_editor', $text, $default_editor );
  3854. }
  3855. /**
  3856. * Perform a deep string replace operation to ensure the values in $search are no longer present
  3857. *
  3858. * Repeats the replacement operation until it no longer replaces anything so as to remove "nested" values
  3859. * e.g. $subject = '%0%0%0DDD', $search ='%0D', $result ='' rather than the '%0%0DD' that
  3860. * str_replace would return
  3861. *
  3862. * @since 2.8.1
  3863. * @access private
  3864. *
  3865. * @param string|array $search The value being searched for, otherwise known as the needle.
  3866. * An array may be used to designate multiple needles.
  3867. * @param string $subject The string being searched and replaced on, otherwise known as the haystack.
  3868. * @return string The string with the replaced values.
  3869. */
  3870. function _deep_replace( $search, $subject ) {
  3871. $subject = (string) $subject;
  3872. $count = 1;
  3873. while ( $count ) {
  3874. $subject = str_replace( $search, '', $subject, $count );
  3875. }
  3876. return $subject;
  3877. }
  3878. /**
  3879. * Escapes data for use in a MySQL query.
  3880. *
  3881. * Usually you should prepare queries using wpdb::prepare().
  3882. * Sometimes, spot-escaping is required or useful. One example
  3883. * is preparing an array for use in an IN clause.
  3884. *
  3885. * NOTE: Since 4.8.3, '%' characters will be replaced with a placeholder string,
  3886. * this prevents certain SQLi attacks from taking place. This change in behaviour
  3887. * may cause issues for code that expects the return value of esc_sql() to be useable
  3888. * for other purposes.
  3889. *
  3890. * @since 2.8.0
  3891. *
  3892. * @global wpdb $wpdb WordPress database abstraction object.
  3893. *
  3894. * @param string|array $data Unescaped data
  3895. * @return string|array Escaped data
  3896. */
  3897. function esc_sql( $data ) {
  3898. global $wpdb;
  3899. return $wpdb->_escape( $data );
  3900. }
  3901. /**
  3902. * Checks and cleans a URL.
  3903. *
  3904. * A number of characters are removed from the URL. If the URL is for displaying
  3905. * (the default behaviour) ampersands are also replaced. The {@see 'clean_url'} filter
  3906. * is applied to the returned cleaned URL.
  3907. *
  3908. * @since 2.8.0
  3909. *
  3910. * @param string $url The URL to be cleaned.
  3911. * @param array $protocols Optional. An array of acceptable protocols.
  3912. * Defaults to return value of wp_allowed_protocols()
  3913. * @param string $_context Private. Use esc_url_raw() for database usage.
  3914. * @return string The cleaned $url after the {@see 'clean_url'} filter is applied.
  3915. */
  3916. function esc_url( $url, $protocols = null, $_context = 'display' ) {
  3917. $original_url = $url;
  3918. if ( '' == $url ) {
  3919. return $url;
  3920. }
  3921. $url = str_replace( ' ', '%20', ltrim( $url ) );
  3922. $url = preg_replace( '|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\[\]\\x80-\\xff]|i', '', $url );
  3923. if ( '' === $url ) {
  3924. return $url;
  3925. }
  3926. if ( 0 !== stripos( $url, 'mailto:' ) ) {
  3927. $strip = array( '%0d', '%0a', '%0D', '%0A' );
  3928. $url = _deep_replace( $strip, $url );
  3929. }
  3930. $url = str_replace( ';//', '://', $url );
  3931. /* If the URL doesn't appear to contain a scheme, we
  3932. * presume it needs http:// prepended (unless a relative
  3933. * link starting with /, # or ? or a php file).
  3934. */
  3935. if ( strpos( $url, ':' ) === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&
  3936. ! preg_match( '/^[a-z0-9-]+?\.php/i', $url ) ) {
  3937. $url = 'http://' . $url;
  3938. }
  3939. // Replace ampersands and single quotes only when displaying.
  3940. if ( 'display' == $_context ) {
  3941. $url = wp_kses_normalize_entities( $url );
  3942. $url = str_replace( '&amp;', '&#038;', $url );
  3943. $url = str_replace( "'", '&#039;', $url );
  3944. }
  3945. if ( ( false !== strpos( $url, '[' ) ) || ( false !== strpos( $url, ']' ) ) ) {
  3946. $parsed = wp_parse_url( $url );
  3947. $front = '';
  3948. if ( isset( $parsed['scheme'] ) ) {
  3949. $front .= $parsed['scheme'] . '://';
  3950. } elseif ( '/' === $url[0] ) {
  3951. $front .= '//';
  3952. }
  3953. if ( isset( $parsed['user'] ) ) {
  3954. $front .= $parsed['user'];
  3955. }
  3956. if ( isset( $parsed['pass'] ) ) {
  3957. $front .= ':' . $parsed['pass'];
  3958. }
  3959. if ( isset( $parsed['user'] ) || isset( $parsed['pass'] ) ) {
  3960. $front .= '@';
  3961. }
  3962. if ( isset( $parsed['host'] ) ) {
  3963. $front .= $parsed['host'];
  3964. }
  3965. if ( isset( $parsed['port'] ) ) {
  3966. $front .= ':' . $parsed['port'];
  3967. }
  3968. $end_dirty = str_replace( $front, '', $url );
  3969. $end_clean = str_replace( array( '[', ']' ), array( '%5B', '%5D' ), $end_dirty );
  3970. $url = str_replace( $end_dirty, $end_clean, $url );
  3971. }
  3972. if ( '/' === $url[0] ) {
  3973. $good_protocol_url = $url;
  3974. } else {
  3975. if ( ! is_array( $protocols ) ) {
  3976. $protocols = wp_allowed_protocols();
  3977. }
  3978. $good_protocol_url = wp_kses_bad_protocol( $url, $protocols );
  3979. if ( strtolower( $good_protocol_url ) != strtolower( $url ) ) {
  3980. return '';
  3981. }
  3982. }
  3983. /**
  3984. * Filters a string cleaned and escaped for output as a URL.
  3985. *
  3986. * @since 2.3.0
  3987. *
  3988. * @param string $good_protocol_url The cleaned URL to be returned.
  3989. * @param string $original_url The URL prior to cleaning.
  3990. * @param string $_context If 'display', replace ampersands and single quotes only.
  3991. */
  3992. return apply_filters( 'clean_url', $good_protocol_url, $original_url, $_context );
  3993. }
  3994. /**
  3995. * Performs esc_url() for database usage.
  3996. *
  3997. * @since 2.8.0
  3998. *
  3999. * @param string $url The URL to be cleaned.
  4000. * @param array $protocols An array of acceptable protocols.
  4001. * @return string The cleaned URL.
  4002. */
  4003. function esc_url_raw( $url, $protocols = null ) {
  4004. return esc_url( $url, $protocols, 'db' );
  4005. }
  4006. /**
  4007. * Convert entities, while preserving already-encoded entities.
  4008. *
  4009. * @link https://secure.php.net/htmlentities Borrowed from the PHP Manual user notes.
  4010. *
  4011. * @since 1.2.2
  4012. *
  4013. * @param string $myHTML The text to be converted.
  4014. * @return string Converted text.
  4015. */
  4016. function htmlentities2( $myHTML ) {
  4017. $translation_table = get_html_translation_table( HTML_ENTITIES, ENT_QUOTES );
  4018. $translation_table[ chr( 38 ) ] = '&';
  4019. return preg_replace( '/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/', '&amp;', strtr( $myHTML, $translation_table ) );
  4020. }
  4021. /**
  4022. * Escape single quotes, htmlspecialchar " < > &, and fix line endings.
  4023. *
  4024. * Escapes text strings for echoing in JS. It is intended to be used for inline JS
  4025. * (in a tag attribute, for example onclick="..."). Note that the strings have to
  4026. * be in single quotes. The {@see 'js_escape'} filter is also applied here.
  4027. *
  4028. * @since 2.8.0
  4029. *
  4030. * @param string $text The text to be escaped.
  4031. * @return string Escaped text.
  4032. */
  4033. function esc_js( $text ) {
  4034. $safe_text = wp_check_invalid_utf8( $text );
  4035. $safe_text = _wp_specialchars( $safe_text, ENT_COMPAT );
  4036. $safe_text = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', "'", stripslashes( $safe_text ) );
  4037. $safe_text = str_replace( "\r", '', $safe_text );
  4038. $safe_text = str_replace( "\n", '\\n', addslashes( $safe_text ) );
  4039. /**
  4040. * Filters a string cleaned and escaped for output in JavaScript.
  4041. *
  4042. * Text passed to esc_js() is stripped of invalid or special characters,
  4043. * and properly slashed for output.
  4044. *
  4045. * @since 2.0.6
  4046. *
  4047. * @param string $safe_text The text after it has been escaped.
  4048. * @param string $text The text prior to being escaped.
  4049. */
  4050. return apply_filters( 'js_escape', $safe_text, $text );
  4051. }
  4052. /**
  4053. * Escaping for HTML blocks.
  4054. *
  4055. * @since 2.8.0
  4056. *
  4057. * @param string $text
  4058. * @return string
  4059. */
  4060. function esc_html( $text ) {
  4061. $safe_text = wp_check_invalid_utf8( $text );
  4062. $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );
  4063. /**
  4064. * Filters a string cleaned and escaped for output in HTML.
  4065. *
  4066. * Text passed to esc_html() is stripped of invalid or special characters
  4067. * before output.
  4068. *
  4069. * @since 2.8.0
  4070. *
  4071. * @param string $safe_text The text after it has been escaped.
  4072. * @param string $text The text prior to being escaped.
  4073. */
  4074. return apply_filters( 'esc_html', $safe_text, $text );
  4075. }
  4076. /**
  4077. * Escaping for HTML attributes.
  4078. *
  4079. * @since 2.8.0
  4080. *
  4081. * @param string $text
  4082. * @return string
  4083. */
  4084. function esc_attr( $text ) {
  4085. $safe_text = wp_check_invalid_utf8( $text );
  4086. $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );
  4087. /**
  4088. * Filters a string cleaned and escaped for output in an HTML attribute.
  4089. *
  4090. * Text passed to esc_attr() is stripped of invalid or special characters
  4091. * before output.
  4092. *
  4093. * @since 2.0.6
  4094. *
  4095. * @param string $safe_text The text after it has been escaped.
  4096. * @param string $text The text prior to being escaped.
  4097. */
  4098. return apply_filters( 'attribute_escape', $safe_text, $text );
  4099. }
  4100. /**
  4101. * Escaping for textarea values.
  4102. *
  4103. * @since 3.1.0
  4104. *
  4105. * @param string $text
  4106. * @return string
  4107. */
  4108. function esc_textarea( $text ) {
  4109. $safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) );
  4110. /**
  4111. * Filters a string cleaned and escaped for output in a textarea element.
  4112. *
  4113. * @since 3.1.0
  4114. *
  4115. * @param string $safe_text The text after it has been escaped.
  4116. * @param string $text The text prior to being escaped.
  4117. */
  4118. return apply_filters( 'esc_textarea', $safe_text, $text );
  4119. }
  4120. /**
  4121. * Escape an HTML tag name.
  4122. *
  4123. * @since 2.5.0
  4124. *
  4125. * @param string $tag_name
  4126. * @return string
  4127. */
  4128. function tag_escape( $tag_name ) {
  4129. $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9_:]/', '', $tag_name ) );
  4130. /**
  4131. * Filters a string cleaned and escaped for output as an HTML tag.
  4132. *
  4133. * @since 2.8.0
  4134. *
  4135. * @param string $safe_tag The tag name after it has been escaped.
  4136. * @param string $tag_name The text before it was escaped.
  4137. */
  4138. return apply_filters( 'tag_escape', $safe_tag, $tag_name );
  4139. }
  4140. /**
  4141. * Convert full URL paths to absolute paths.
  4142. *
  4143. * Removes the http or https protocols and the domain. Keeps the path '/' at the
  4144. * beginning, so it isn't a true relative link, but from the web root base.
  4145. *
  4146. * @since 2.1.0
  4147. * @since 4.1.0 Support was added for relative URLs.
  4148. *
  4149. * @param string $link Full URL path.
  4150. * @return string Absolute path.
  4151. */
  4152. function wp_make_link_relative( $link ) {
  4153. return preg_replace( '|^(https?:)?//[^/]+(/?.*)|i', '$2', $link );
  4154. }
  4155. /**
  4156. * Sanitises various option values based on the nature of the option.
  4157. *
  4158. * This is basically a switch statement which will pass $value through a number
  4159. * of functions depending on the $option.
  4160. *
  4161. * @since 2.0.5
  4162. *
  4163. * @global wpdb $wpdb WordPress database abstraction object.
  4164. *
  4165. * @param string $option The name of the option.
  4166. * @param string $value The unsanitised value.
  4167. * @return string Sanitized value.
  4168. */
  4169. function sanitize_option( $option, $value ) {
  4170. global $wpdb;
  4171. $original_value = $value;
  4172. $error = '';
  4173. switch ( $option ) {
  4174. case 'admin_email':
  4175. case 'new_admin_email':
  4176. $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
  4177. if ( is_wp_error( $value ) ) {
  4178. $error = $value->get_error_message();
  4179. } else {
  4180. $value = sanitize_email( $value );
  4181. if ( ! is_email( $value ) ) {
  4182. $error = __( 'The email address entered did not appear to be a valid email address. Please enter a valid email address.' );
  4183. }
  4184. }
  4185. break;
  4186. case 'thumbnail_size_w':
  4187. case 'thumbnail_size_h':
  4188. case 'medium_size_w':
  4189. case 'medium_size_h':
  4190. case 'medium_large_size_w':
  4191. case 'medium_large_size_h':
  4192. case 'large_size_w':
  4193. case 'large_size_h':
  4194. case 'mailserver_port':
  4195. case 'comment_max_links':
  4196. case 'page_on_front':
  4197. case 'page_for_posts':
  4198. case 'rss_excerpt_length':
  4199. case 'default_category':
  4200. case 'default_email_category':
  4201. case 'default_link_category':
  4202. case 'close_comments_days_old':
  4203. case 'comments_per_page':
  4204. case 'thread_comments_depth':
  4205. case 'users_can_register':
  4206. case 'start_of_week':
  4207. case 'site_icon':
  4208. $value = absint( $value );
  4209. break;
  4210. case 'posts_per_page':
  4211. case 'posts_per_rss':
  4212. $value = (int) $value;
  4213. if ( empty( $value ) ) {
  4214. $value = 1;
  4215. }
  4216. if ( $value < -1 ) {
  4217. $value = abs( $value );
  4218. }
  4219. break;
  4220. case 'default_ping_status':
  4221. case 'default_comment_status':
  4222. // Options that if not there have 0 value but need to be something like "closed"
  4223. if ( $value == '0' || $value == '' ) {
  4224. $value = 'closed';
  4225. }
  4226. break;
  4227. case 'blogdescription':
  4228. case 'blogname':
  4229. $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
  4230. if ( $value !== $original_value ) {
  4231. $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', wp_encode_emoji( $original_value ) );
  4232. }
  4233. if ( is_wp_error( $value ) ) {
  4234. $error = $value->get_error_message();
  4235. } else {
  4236. $value = esc_html( $value );
  4237. }
  4238. break;
  4239. case 'blog_charset':
  4240. $value = preg_replace( '/[^a-zA-Z0-9_-]/', '', $value ); // strips slashes
  4241. break;
  4242. case 'blog_public':
  4243. // This is the value if the settings checkbox is not checked on POST. Don't rely on this.
  4244. if ( null === $value ) {
  4245. $value = 1;
  4246. } else {
  4247. $value = intval( $value );
  4248. }
  4249. break;
  4250. case 'date_format':
  4251. case 'time_format':
  4252. case 'mailserver_url':
  4253. case 'mailserver_login':
  4254. case 'mailserver_pass':
  4255. case 'upload_path':
  4256. $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
  4257. if ( is_wp_error( $value ) ) {
  4258. $error = $value->get_error_message();
  4259. } else {
  4260. $value = strip_tags( $value );
  4261. $value = wp_kses_data( $value );
  4262. }
  4263. break;
  4264. case 'ping_sites':
  4265. $value = explode( "\n", $value );
  4266. $value = array_filter( array_map( 'trim', $value ) );
  4267. $value = array_filter( array_map( 'esc_url_raw', $value ) );
  4268. $value = implode( "\n", $value );
  4269. break;
  4270. case 'gmt_offset':
  4271. $value = preg_replace( '/[^0-9:.-]/', '', $value ); // strips slashes
  4272. break;
  4273. case 'siteurl':
  4274. $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
  4275. if ( is_wp_error( $value ) ) {
  4276. $error = $value->get_error_message();
  4277. } else {
  4278. if ( preg_match( '#http(s?)://(.+)#i', $value ) ) {
  4279. $value = esc_url_raw( $value );
  4280. } else {
  4281. $error = __( 'The WordPress address you entered did not appear to be a valid URL. Please enter a valid URL.' );
  4282. }
  4283. }
  4284. break;
  4285. case 'home':
  4286. $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
  4287. if ( is_wp_error( $value ) ) {
  4288. $error = $value->get_error_message();
  4289. } else {
  4290. if ( preg_match( '#http(s?)://(.+)#i', $value ) ) {
  4291. $value = esc_url_raw( $value );
  4292. } else {
  4293. $error = __( 'The Site address you entered did not appear to be a valid URL. Please enter a valid URL.' );
  4294. }
  4295. }
  4296. break;
  4297. case 'WPLANG':
  4298. $allowed = get_available_languages();
  4299. if ( ! is_multisite() && defined( 'WPLANG' ) && '' !== WPLANG && 'en_US' !== WPLANG ) {
  4300. $allowed[] = WPLANG;
  4301. }
  4302. if ( ! in_array( $value, $allowed ) && ! empty( $value ) ) {
  4303. $value = get_option( $option );
  4304. }
  4305. break;
  4306. case 'illegal_names':
  4307. $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
  4308. if ( is_wp_error( $value ) ) {
  4309. $error = $value->get_error_message();
  4310. } else {
  4311. if ( ! is_array( $value ) ) {
  4312. $value = explode( ' ', $value );
  4313. }
  4314. $value = array_values( array_filter( array_map( 'trim', $value ) ) );
  4315. if ( ! $value ) {
  4316. $value = '';
  4317. }
  4318. }
  4319. break;
  4320. case 'limited_email_domains':
  4321. case 'banned_email_domains':
  4322. $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
  4323. if ( is_wp_error( $value ) ) {
  4324. $error = $value->get_error_message();
  4325. } else {
  4326. if ( ! is_array( $value ) ) {
  4327. $value = explode( "\n", $value );
  4328. }
  4329. $domains = array_values( array_filter( array_map( 'trim', $value ) ) );
  4330. $value = array();
  4331. foreach ( $domains as $domain ) {
  4332. if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) ) {
  4333. $value[] = $domain;
  4334. }
  4335. }
  4336. if ( ! $value ) {
  4337. $value = '';
  4338. }
  4339. }
  4340. break;
  4341. case 'timezone_string':
  4342. $allowed_zones = timezone_identifiers_list();
  4343. if ( ! in_array( $value, $allowed_zones ) && ! empty( $value ) ) {
  4344. $error = __( 'The timezone you have entered is not valid. Please select a valid timezone.' );
  4345. }
  4346. break;
  4347. case 'permalink_structure':
  4348. case 'category_base':
  4349. case 'tag_base':
  4350. $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
  4351. if ( is_wp_error( $value ) ) {
  4352. $error = $value->get_error_message();
  4353. } else {
  4354. $value = esc_url_raw( $value );
  4355. $value = str_replace( 'http://', '', $value );
  4356. }
  4357. if ( 'permalink_structure' === $option && '' !== $value && ! preg_match( '/%[^\/%]+%/', $value ) ) {
  4358. $error = sprintf(
  4359. /* translators: %s: Documentation URL. */
  4360. __( 'A structure tag is required when using custom permalinks. <a href="%s">Learn more</a>' ),
  4361. __( 'https://wordpress.org/support/article/using-permalinks/#choosing-your-permalink-structure' )
  4362. );
  4363. }
  4364. break;
  4365. case 'default_role':
  4366. if ( ! get_role( $value ) && get_role( 'subscriber' ) ) {
  4367. $value = 'subscriber';
  4368. }
  4369. break;
  4370. case 'moderation_keys':
  4371. case 'blacklist_keys':
  4372. $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
  4373. if ( is_wp_error( $value ) ) {
  4374. $error = $value->get_error_message();
  4375. } else {
  4376. $value = explode( "\n", $value );
  4377. $value = array_filter( array_map( 'trim', $value ) );
  4378. $value = array_unique( $value );
  4379. $value = implode( "\n", $value );
  4380. }
  4381. break;
  4382. }
  4383. if ( ! empty( $error ) ) {
  4384. $value = get_option( $option );
  4385. if ( function_exists( 'add_settings_error' ) ) {
  4386. add_settings_error( $option, "invalid_{$option}", $error );
  4387. }
  4388. }
  4389. /**
  4390. * Filters an option value following sanitization.
  4391. *
  4392. * @since 2.3.0
  4393. * @since 4.3.0 Added the `$original_value` parameter.
  4394. *
  4395. * @param string $value The sanitized option value.
  4396. * @param string $option The option name.
  4397. * @param string $original_value The original value passed to the function.
  4398. */
  4399. return apply_filters( "sanitize_option_{$option}", $value, $option, $original_value );
  4400. }
  4401. /**
  4402. * Maps a function to all non-iterable elements of an array or an object.
  4403. *
  4404. * This is similar to `array_walk_recursive()` but acts upon objects too.
  4405. *
  4406. * @since 4.4.0
  4407. *
  4408. * @param mixed $value The array, object, or scalar.
  4409. * @param callable $callback The function to map onto $value.
  4410. * @return mixed The value with the callback applied to all non-arrays and non-objects inside it.
  4411. */
  4412. function map_deep( $value, $callback ) {
  4413. if ( is_array( $value ) ) {
  4414. foreach ( $value as $index => $item ) {
  4415. $value[ $index ] = map_deep( $item, $callback );
  4416. }
  4417. } elseif ( is_object( $value ) ) {
  4418. $object_vars = get_object_vars( $value );
  4419. foreach ( $object_vars as $property_name => $property_value ) {
  4420. $value->$property_name = map_deep( $property_value, $callback );
  4421. }
  4422. } else {
  4423. $value = call_user_func( $callback, $value );
  4424. }
  4425. return $value;
  4426. }
  4427. /**
  4428. * Parses a string into variables to be stored in an array.
  4429. *
  4430. *
  4431. * @since 2.2.1
  4432. *
  4433. * @param string $string The string to be parsed.
  4434. * @param array $array Variables will be stored in this array.
  4435. */
  4436. function wp_parse_str( $string, &$array ) {
  4437. parse_str( $string, $array );
  4438. /**
  4439. * Filters the array of variables derived from a parsed string.
  4440. *
  4441. * @since 2.3.0
  4442. *
  4443. * @param array $array The array populated with variables.
  4444. */
  4445. $array = apply_filters( 'wp_parse_str', $array );
  4446. }
  4447. /**
  4448. * Convert lone less than signs.
  4449. *
  4450. * KSES already converts lone greater than signs.
  4451. *
  4452. * @since 2.3.0
  4453. *
  4454. * @param string $text Text to be converted.
  4455. * @return string Converted text.
  4456. */
  4457. function wp_pre_kses_less_than( $text ) {
  4458. return preg_replace_callback( '%<[^>]*?((?=<)|>|$)%', 'wp_pre_kses_less_than_callback', $text );
  4459. }
  4460. /**
  4461. * Callback function used by preg_replace.
  4462. *
  4463. * @since 2.3.0
  4464. *
  4465. * @param array $matches Populated by matches to preg_replace.
  4466. * @return string The text returned after esc_html if needed.
  4467. */
  4468. function wp_pre_kses_less_than_callback( $matches ) {
  4469. if ( false === strpos( $matches[0], '>' ) ) {
  4470. return esc_html( $matches[0] );
  4471. }
  4472. return $matches[0];
  4473. }
  4474. /**
  4475. * WordPress implementation of PHP sprintf() with filters.
  4476. *
  4477. * @since 2.5.0
  4478. * @since 5.3.0 Formalized the existing and already documented `...$args` parameter
  4479. * by adding it to the function signature.
  4480. *
  4481. * @link https://secure.php.net/sprintf
  4482. *
  4483. * @param string $pattern The string which formatted args are inserted.
  4484. * @param mixed ...$args Arguments to be formatted into the $pattern string.
  4485. * @return string The formatted string.
  4486. */
  4487. function wp_sprintf( $pattern, ...$args ) {
  4488. $len = strlen( $pattern );
  4489. $start = 0;
  4490. $result = '';
  4491. $arg_index = 0;
  4492. while ( $len > $start ) {
  4493. // Last character: append and break
  4494. if ( strlen( $pattern ) - 1 == $start ) {
  4495. $result .= substr( $pattern, -1 );
  4496. break;
  4497. }
  4498. // Literal %: append and continue
  4499. if ( substr( $pattern, $start, 2 ) == '%%' ) {
  4500. $start += 2;
  4501. $result .= '%';
  4502. continue;
  4503. }
  4504. // Get fragment before next %
  4505. $end = strpos( $pattern, '%', $start + 1 );
  4506. if ( false === $end ) {
  4507. $end = $len;
  4508. }
  4509. $fragment = substr( $pattern, $start, $end - $start );
  4510. // Fragment has a specifier
  4511. if ( $pattern[ $start ] == '%' ) {
  4512. // Find numbered arguments or take the next one in order
  4513. if ( preg_match( '/^%(\d+)\$/', $fragment, $matches ) ) {
  4514. $index = $matches[1] - 1; // 0-based array vs 1-based sprintf arguments.
  4515. $arg = isset( $args[ $index ] ) ? $args[ $index ] : '';
  4516. $fragment = str_replace( "%{$matches[1]}$", '%', $fragment );
  4517. } else {
  4518. $arg = isset( $args[ $arg_index ] ) ? $args[ $arg_index ] : '';
  4519. ++$arg_index;
  4520. }
  4521. /**
  4522. * Filters a fragment from the pattern passed to wp_sprintf().
  4523. *
  4524. * If the fragment is unchanged, then sprintf() will be run on the fragment.
  4525. *
  4526. * @since 2.5.0
  4527. *
  4528. * @param string $fragment A fragment from the pattern.
  4529. * @param string $arg The argument.
  4530. */
  4531. $_fragment = apply_filters( 'wp_sprintf', $fragment, $arg );
  4532. if ( $_fragment != $fragment ) {
  4533. $fragment = $_fragment;
  4534. } else {
  4535. $fragment = sprintf( $fragment, strval( $arg ) );
  4536. }
  4537. }
  4538. // Append to result and move to next fragment
  4539. $result .= $fragment;
  4540. $start = $end;
  4541. }
  4542. return $result;
  4543. }
  4544. /**
  4545. * Localize list items before the rest of the content.
  4546. *
  4547. * The '%l' must be at the first characters can then contain the rest of the
  4548. * content. The list items will have ', ', ', and', and ' and ' added depending
  4549. * on the amount of list items in the $args parameter.
  4550. *
  4551. * @since 2.5.0
  4552. *
  4553. * @param string $pattern Content containing '%l' at the beginning.
  4554. * @param array $args List items to prepend to the content and replace '%l'.
  4555. * @return string Localized list items and rest of the content.
  4556. */
  4557. function wp_sprintf_l( $pattern, $args ) {
  4558. // Not a match
  4559. if ( substr( $pattern, 0, 2 ) != '%l' ) {
  4560. return $pattern;
  4561. }
  4562. // Nothing to work with
  4563. if ( empty( $args ) ) {
  4564. return '';
  4565. }
  4566. /**
  4567. * Filters the translated delimiters used by wp_sprintf_l().
  4568. * Placeholders (%s) are included to assist translators and then
  4569. * removed before the array of strings reaches the filter.
  4570. *
  4571. * Please note: Ampersands and entities should be avoided here.
  4572. *
  4573. * @since 2.5.0
  4574. *
  4575. * @param array $delimiters An array of translated delimiters.
  4576. */
  4577. $l = apply_filters(
  4578. 'wp_sprintf_l',
  4579. array(
  4580. /* translators: Used to join items in a list with more than 2 items. */
  4581. 'between' => sprintf( __( '%1$s, %2$s' ), '', '' ),
  4582. /* translators: Used to join last two items in a list with more than 2 times. */
  4583. 'between_last_two' => sprintf( __( '%1$s, and %2$s' ), '', '' ),
  4584. /* translators: Used to join items in a list with only 2 items. */
  4585. 'between_only_two' => sprintf( __( '%1$s and %2$s' ), '', '' ),
  4586. )
  4587. );
  4588. $args = (array) $args;
  4589. $result = array_shift( $args );
  4590. if ( count( $args ) == 1 ) {
  4591. $result .= $l['between_only_two'] . array_shift( $args );
  4592. }
  4593. // Loop when more than two args
  4594. $i = count( $args );
  4595. while ( $i ) {
  4596. $arg = array_shift( $args );
  4597. $i--;
  4598. if ( 0 == $i ) {
  4599. $result .= $l['between_last_two'] . $arg;
  4600. } else {
  4601. $result .= $l['between'] . $arg;
  4602. }
  4603. }
  4604. return $result . substr( $pattern, 2 );
  4605. }
  4606. /**
  4607. * Safely extracts not more than the first $count characters from html string.
  4608. *
  4609. * UTF-8, tags and entities safe prefix extraction. Entities inside will *NOT*
  4610. * be counted as one character. For example &amp; will be counted as 4, &lt; as
  4611. * 3, etc.
  4612. *
  4613. * @since 2.5.0
  4614. *
  4615. * @param string $str String to get the excerpt from.
  4616. * @param int $count Maximum number of characters to take.
  4617. * @param string $more Optional. What to append if $str needs to be trimmed. Defaults to empty string.
  4618. * @return string The excerpt.
  4619. */
  4620. function wp_html_excerpt( $str, $count, $more = null ) {
  4621. if ( null === $more ) {
  4622. $more = '';
  4623. }
  4624. $str = wp_strip_all_tags( $str, true );
  4625. $excerpt = mb_substr( $str, 0, $count );
  4626. // remove part of an entity at the end
  4627. $excerpt = preg_replace( '/&[^;\s]{0,6}$/', '', $excerpt );
  4628. if ( $str != $excerpt ) {
  4629. $excerpt = trim( $excerpt ) . $more;
  4630. }
  4631. return $excerpt;
  4632. }
  4633. /**
  4634. * Add a Base url to relative links in passed content.
  4635. *
  4636. * By default it supports the 'src' and 'href' attributes. However this can be
  4637. * changed via the 3rd param.
  4638. *
  4639. * @since 2.7.0
  4640. *
  4641. * @global string $_links_add_base
  4642. *
  4643. * @param string $content String to search for links in.
  4644. * @param string $base The base URL to prefix to links.
  4645. * @param array $attrs The attributes which should be processed.
  4646. * @return string The processed content.
  4647. */
  4648. function links_add_base_url( $content, $base, $attrs = array( 'src', 'href' ) ) {
  4649. global $_links_add_base;
  4650. $_links_add_base = $base;
  4651. $attrs = implode( '|', (array) $attrs );
  4652. return preg_replace_callback( "!($attrs)=(['\"])(.+?)\\2!i", '_links_add_base', $content );
  4653. }
  4654. /**
  4655. * Callback to add a base url to relative links in passed content.
  4656. *
  4657. * @since 2.7.0
  4658. * @access private
  4659. *
  4660. * @global string $_links_add_base
  4661. *
  4662. * @param string $m The matched link.
  4663. * @return string The processed link.
  4664. */
  4665. function _links_add_base( $m ) {
  4666. global $_links_add_base;
  4667. //1 = attribute name 2 = quotation mark 3 = URL
  4668. return $m[1] . '=' . $m[2] .
  4669. ( preg_match( '#^(\w{1,20}):#', $m[3], $protocol ) && in_array( $protocol[1], wp_allowed_protocols() ) ?
  4670. $m[3] :
  4671. WP_Http::make_absolute_url( $m[3], $_links_add_base )
  4672. )
  4673. . $m[2];
  4674. }
  4675. /**
  4676. * Adds a Target attribute to all links in passed content.
  4677. *
  4678. * This function by default only applies to `<a>` tags, however this can be
  4679. * modified by the 3rd param.
  4680. *
  4681. * *NOTE:* Any current target attributed will be stripped and replaced.
  4682. *
  4683. * @since 2.7.0
  4684. *
  4685. * @global string $_links_add_target
  4686. *
  4687. * @param string $content String to search for links in.
  4688. * @param string $target The Target to add to the links.
  4689. * @param array $tags An array of tags to apply to.
  4690. * @return string The processed content.
  4691. */
  4692. function links_add_target( $content, $target = '_blank', $tags = array( 'a' ) ) {
  4693. global $_links_add_target;
  4694. $_links_add_target = $target;
  4695. $tags = implode( '|', (array) $tags );
  4696. return preg_replace_callback( "!<($tags)([^>]*)>!i", '_links_add_target', $content );
  4697. }
  4698. /**
  4699. * Callback to add a target attribute to all links in passed content.
  4700. *
  4701. * @since 2.7.0
  4702. * @access private
  4703. *
  4704. * @global string $_links_add_target
  4705. *
  4706. * @param string $m The matched link.
  4707. * @return string The processed link.
  4708. */
  4709. function _links_add_target( $m ) {
  4710. global $_links_add_target;
  4711. $tag = $m[1];
  4712. $link = preg_replace( '|( target=([\'"])(.*?)\2)|i', '', $m[2] );
  4713. return '<' . $tag . $link . ' target="' . esc_attr( $_links_add_target ) . '">';
  4714. }
  4715. /**
  4716. * Normalize EOL characters and strip duplicate whitespace.
  4717. *
  4718. * @since 2.7.0
  4719. *
  4720. * @param string $str The string to normalize.
  4721. * @return string The normalized string.
  4722. */
  4723. function normalize_whitespace( $str ) {
  4724. $str = trim( $str );
  4725. $str = str_replace( "\r", "\n", $str );
  4726. $str = preg_replace( array( '/\n+/', '/[ \t]+/' ), array( "\n", ' ' ), $str );
  4727. return $str;
  4728. }
  4729. /**
  4730. * Properly strip all HTML tags including script and style
  4731. *
  4732. * This differs from strip_tags() because it removes the contents of
  4733. * the `<script>` and `<style>` tags. E.g. `strip_tags( '<script>something</script>' )`
  4734. * will return 'something'. wp_strip_all_tags will return ''
  4735. *
  4736. * @since 2.9.0
  4737. *
  4738. * @param string $string String containing HTML tags
  4739. * @param bool $remove_breaks Optional. Whether to remove left over line breaks and white space chars
  4740. * @return string The processed string.
  4741. */
  4742. function wp_strip_all_tags( $string, $remove_breaks = false ) {
  4743. $string = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string );
  4744. $string = strip_tags( $string );
  4745. if ( $remove_breaks ) {
  4746. $string = preg_replace( '/[\r\n\t ]+/', ' ', $string );
  4747. }
  4748. return trim( $string );
  4749. }
  4750. /**
  4751. * Sanitizes a string from user input or from the database.
  4752. *
  4753. * - Checks for invalid UTF-8,
  4754. * - Converts single `<` characters to entities
  4755. * - Strips all tags
  4756. * - Removes line breaks, tabs, and extra whitespace
  4757. * - Strips octets
  4758. *
  4759. * @since 2.9.0
  4760. *
  4761. * @see sanitize_textarea_field()
  4762. * @see wp_check_invalid_utf8()
  4763. * @see wp_strip_all_tags()
  4764. *
  4765. * @param string $str String to sanitize.
  4766. * @return string Sanitized string.
  4767. */
  4768. function sanitize_text_field( $str ) {
  4769. $filtered = _sanitize_text_fields( $str, false );
  4770. /**
  4771. * Filters a sanitized text field string.
  4772. *
  4773. * @since 2.9.0
  4774. *
  4775. * @param string $filtered The sanitized string.
  4776. * @param string $str The string prior to being sanitized.
  4777. */
  4778. return apply_filters( 'sanitize_text_field', $filtered, $str );
  4779. }
  4780. /**
  4781. * Sanitizes a multiline string from user input or from the database.
  4782. *
  4783. * The function is like sanitize_text_field(), but preserves
  4784. * new lines (\n) and other whitespace, which are legitimate
  4785. * input in textarea elements.
  4786. *
  4787. * @see sanitize_text_field()
  4788. *
  4789. * @since 4.7.0
  4790. *
  4791. * @param string $str String to sanitize.
  4792. * @return string Sanitized string.
  4793. */
  4794. function sanitize_textarea_field( $str ) {
  4795. $filtered = _sanitize_text_fields( $str, true );
  4796. /**
  4797. * Filters a sanitized textarea field string.
  4798. *
  4799. * @since 4.7.0
  4800. *
  4801. * @param string $filtered The sanitized string.
  4802. * @param string $str The string prior to being sanitized.
  4803. */
  4804. return apply_filters( 'sanitize_textarea_field', $filtered, $str );
  4805. }
  4806. /**
  4807. * Internal helper function to sanitize a string from user input or from the db
  4808. *
  4809. * @since 4.7.0
  4810. * @access private
  4811. *
  4812. * @param string $str String to sanitize.
  4813. * @param bool $keep_newlines optional Whether to keep newlines. Default: false.
  4814. * @return string Sanitized string.
  4815. */
  4816. function _sanitize_text_fields( $str, $keep_newlines = false ) {
  4817. if ( is_object( $str ) || is_array( $str ) ) {
  4818. return '';
  4819. }
  4820. $str = (string) $str;
  4821. $filtered = wp_check_invalid_utf8( $str );
  4822. if ( strpos( $filtered, '<' ) !== false ) {
  4823. $filtered = wp_pre_kses_less_than( $filtered );
  4824. // This will strip extra whitespace for us.
  4825. $filtered = wp_strip_all_tags( $filtered, false );
  4826. // Use html entities in a special case to make sure no later
  4827. // newline stripping stage could lead to a functional tag
  4828. $filtered = str_replace( "<\n", "&lt;\n", $filtered );
  4829. }
  4830. if ( ! $keep_newlines ) {
  4831. $filtered = preg_replace( '/[\r\n\t ]+/', ' ', $filtered );
  4832. }
  4833. $filtered = trim( $filtered );
  4834. $found = false;
  4835. while ( preg_match( '/%[a-f0-9]{2}/i', $filtered, $match ) ) {
  4836. $filtered = str_replace( $match[0], '', $filtered );
  4837. $found = true;
  4838. }
  4839. if ( $found ) {
  4840. // Strip out the whitespace that may now exist after removing the octets.
  4841. $filtered = trim( preg_replace( '/ +/', ' ', $filtered ) );
  4842. }
  4843. return $filtered;
  4844. }
  4845. /**
  4846. * i18n friendly version of basename()
  4847. *
  4848. * @since 3.1.0
  4849. *
  4850. * @param string $path A path.
  4851. * @param string $suffix If the filename ends in suffix this will also be cut off.
  4852. * @return string
  4853. */
  4854. function wp_basename( $path, $suffix = '' ) {
  4855. return urldecode( basename( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ), $suffix ) );
  4856. }
  4857. // phpcs:disable WordPress.WP.CapitalPDangit.Misspelled, WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid -- 8-)
  4858. /**
  4859. * Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence).
  4860. *
  4861. * Violating our coding standards for a good function name.
  4862. *
  4863. * @since 3.0.0
  4864. *
  4865. * @staticvar string|false $dblq
  4866. *
  4867. * @param string $text The text to be modified.
  4868. * @return string The modified text.
  4869. */
  4870. function capital_P_dangit( $text ) {
  4871. // Simple replacement for titles
  4872. $current_filter = current_filter();
  4873. if ( 'the_title' === $current_filter || 'wp_title' === $current_filter ) {
  4874. return str_replace( 'Wordpress', 'WordPress', $text );
  4875. }
  4876. // Still here? Use the more judicious replacement
  4877. static $dblq = false;
  4878. if ( false === $dblq ) {
  4879. $dblq = _x( '&#8220;', 'opening curly double quote' );
  4880. }
  4881. return str_replace(
  4882. array( ' Wordpress', '&#8216;Wordpress', $dblq . 'Wordpress', '>Wordpress', '(Wordpress' ),
  4883. array( ' WordPress', '&#8216;WordPress', $dblq . 'WordPress', '>WordPress', '(WordPress' ),
  4884. $text
  4885. );
  4886. }
  4887. // phpcs:enable
  4888. /**
  4889. * Sanitize a mime type
  4890. *
  4891. * @since 3.1.3
  4892. *
  4893. * @param string $mime_type Mime type
  4894. * @return string Sanitized mime type
  4895. */
  4896. function sanitize_mime_type( $mime_type ) {
  4897. $sani_mime_type = preg_replace( '/[^-+*.a-zA-Z0-9\/]/', '', $mime_type );
  4898. /**
  4899. * Filters a mime type following sanitization.
  4900. *
  4901. * @since 3.1.3
  4902. *
  4903. * @param string $sani_mime_type The sanitized mime type.
  4904. * @param string $mime_type The mime type prior to sanitization.
  4905. */
  4906. return apply_filters( 'sanitize_mime_type', $sani_mime_type, $mime_type );
  4907. }
  4908. /**
  4909. * Sanitize space or carriage return separated URLs that are used to send trackbacks.
  4910. *
  4911. * @since 3.4.0
  4912. *
  4913. * @param string $to_ping Space or carriage return separated URLs
  4914. * @return string URLs starting with the http or https protocol, separated by a carriage return.
  4915. */
  4916. function sanitize_trackback_urls( $to_ping ) {
  4917. $urls_to_ping = preg_split( '/[\r\n\t ]/', trim( $to_ping ), -1, PREG_SPLIT_NO_EMPTY );
  4918. foreach ( $urls_to_ping as $k => $url ) {
  4919. if ( ! preg_match( '#^https?://.#i', $url ) ) {
  4920. unset( $urls_to_ping[ $k ] );
  4921. }
  4922. }
  4923. $urls_to_ping = array_map( 'esc_url_raw', $urls_to_ping );
  4924. $urls_to_ping = implode( "\n", $urls_to_ping );
  4925. /**
  4926. * Filters a list of trackback URLs following sanitization.
  4927. *
  4928. * The string returned here consists of a space or carriage return-delimited list
  4929. * of trackback URLs.
  4930. *
  4931. * @since 3.4.0
  4932. *
  4933. * @param string $urls_to_ping Sanitized space or carriage return separated URLs.
  4934. * @param string $to_ping Space or carriage return separated URLs before sanitization.
  4935. */
  4936. return apply_filters( 'sanitize_trackback_urls', $urls_to_ping, $to_ping );
  4937. }
  4938. /**
  4939. * Add slashes to a string or array of strings.
  4940. *
  4941. * This should be used when preparing data for core API that expects slashed data.
  4942. * This should not be used to escape data going directly into an SQL query.
  4943. *
  4944. * @since 3.6.0
  4945. *
  4946. * @param string|array $value String or array of strings to slash.
  4947. * @return string|array Slashed $value
  4948. */
  4949. function wp_slash( $value ) {
  4950. if ( is_array( $value ) ) {
  4951. foreach ( $value as $k => $v ) {
  4952. if ( is_array( $v ) ) {
  4953. $value[ $k ] = wp_slash( $v );
  4954. } else {
  4955. $value[ $k ] = addslashes( $v );
  4956. }
  4957. }
  4958. } else {
  4959. $value = addslashes( $value );
  4960. }
  4961. return $value;
  4962. }
  4963. /**
  4964. * Remove slashes from a string or array of strings.
  4965. *
  4966. * This should be used to remove slashes from data passed to core API that
  4967. * expects data to be unslashed.
  4968. *
  4969. * @since 3.6.0
  4970. *
  4971. * @param string|array $value String or array of strings to unslash.
  4972. * @return string|array Unslashed $value
  4973. */
  4974. function wp_unslash( $value ) {
  4975. return stripslashes_deep( $value );
  4976. }
  4977. /**
  4978. * Adds slashes to only string values in an array of values.
  4979. *
  4980. * This should be used when preparing data for core APIs that expect slashed data.
  4981. * This should not be used to escape data going directly into an SQL query.
  4982. *
  4983. * @since 5.3.0
  4984. *
  4985. * @param mixed $value Scalar or array of scalars.
  4986. * @return mixed Slashes $value
  4987. */
  4988. function wp_slash_strings_only( $value ) {
  4989. return map_deep( $value, 'addslashes_strings_only' );
  4990. }
  4991. /**
  4992. * Adds slashes only if the provided value is a string.
  4993. *
  4994. * @since 5.3.0
  4995. *
  4996. * @param mixed $value
  4997. * @return mixed
  4998. */
  4999. function addslashes_strings_only( $value ) {
  5000. return is_string( $value ) ? addslashes( $value ) : $value;
  5001. }
  5002. /**
  5003. * Extract and return the first URL from passed content.
  5004. *
  5005. * @since 3.6.0
  5006. *
  5007. * @param string $content A string which might contain a URL.
  5008. * @return string|false The found URL.
  5009. */
  5010. function get_url_in_content( $content ) {
  5011. if ( empty( $content ) ) {
  5012. return false;
  5013. }
  5014. if ( preg_match( '/<a\s[^>]*?href=([\'"])(.+?)\1/is', $content, $matches ) ) {
  5015. return esc_url_raw( $matches[2] );
  5016. }
  5017. return false;
  5018. }
  5019. /**
  5020. * Returns the regexp for common whitespace characters.
  5021. *
  5022. * By default, spaces include new lines, tabs, nbsp entities, and the UTF-8 nbsp.
  5023. * This is designed to replace the PCRE \s sequence. In ticket #22692, that
  5024. * sequence was found to be unreliable due to random inclusion of the A0 byte.
  5025. *
  5026. * @since 4.0.0
  5027. *
  5028. * @staticvar string $spaces
  5029. *
  5030. * @return string The spaces regexp.
  5031. */
  5032. function wp_spaces_regexp() {
  5033. static $spaces = '';
  5034. if ( empty( $spaces ) ) {
  5035. /**
  5036. * Filters the regexp for common whitespace characters.
  5037. *
  5038. * This string is substituted for the \s sequence as needed in regular
  5039. * expressions. For websites not written in English, different characters
  5040. * may represent whitespace. For websites not encoded in UTF-8, the 0xC2 0xA0
  5041. * sequence may not be in use.
  5042. *
  5043. * @since 4.0.0
  5044. *
  5045. * @param string $spaces Regexp pattern for matching common whitespace characters.
  5046. */
  5047. $spaces = apply_filters( 'wp_spaces_regexp', '[\r\n\t ]|\xC2\xA0|&nbsp;' );
  5048. }
  5049. return $spaces;
  5050. }
  5051. /**
  5052. * Print the important emoji-related styles.
  5053. *
  5054. * @since 4.2.0
  5055. *
  5056. * @staticvar bool $printed
  5057. */
  5058. function print_emoji_styles() {
  5059. static $printed = false;
  5060. if ( $printed ) {
  5061. return;
  5062. }
  5063. $printed = true;
  5064. $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
  5065. ?>
  5066. <style<?php echo $type_attr; ?>>
  5067. img.wp-smiley,
  5068. img.emoji {
  5069. display: inline !important;
  5070. border: none !important;
  5071. box-shadow: none !important;
  5072. height: 1em !important;
  5073. width: 1em !important;
  5074. margin: 0 .07em !important;
  5075. vertical-align: -0.1em !important;
  5076. background: none !important;
  5077. padding: 0 !important;
  5078. }
  5079. </style>
  5080. <?php
  5081. }
  5082. /**
  5083. * Print the inline Emoji detection script if it is not already printed.
  5084. *
  5085. * @since 4.2.0
  5086. * @staticvar bool $printed
  5087. */
  5088. function print_emoji_detection_script() {
  5089. static $printed = false;
  5090. if ( $printed ) {
  5091. return;
  5092. }
  5093. $printed = true;
  5094. _print_emoji_detection_script();
  5095. }
  5096. /**
  5097. * Prints inline Emoji detection script.
  5098. *
  5099. * @ignore
  5100. * @since 4.6.0
  5101. * @access private
  5102. */
  5103. function _print_emoji_detection_script() {
  5104. $settings = array(
  5105. /**
  5106. * Filters the URL where emoji png images are hosted.
  5107. *
  5108. * @since 4.2.0
  5109. *
  5110. * @param string The emoji base URL for png images.
  5111. */
  5112. 'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/12.0.0-1/72x72/' ),
  5113. /**
  5114. * Filters the extension of the emoji png files.
  5115. *
  5116. * @since 4.2.0
  5117. *
  5118. * @param string The emoji extension for png files. Default .png.
  5119. */
  5120. 'ext' => apply_filters( 'emoji_ext', '.png' ),
  5121. /**
  5122. * Filters the URL where emoji SVG images are hosted.
  5123. *
  5124. * @since 4.6.0
  5125. *
  5126. * @param string The emoji base URL for svg images.
  5127. */
  5128. 'svgUrl' => apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/12.0.0-1/svg/' ),
  5129. /**
  5130. * Filters the extension of the emoji SVG files.
  5131. *
  5132. * @since 4.6.0
  5133. *
  5134. * @param string The emoji extension for svg files. Default .svg.
  5135. */
  5136. 'svgExt' => apply_filters( 'emoji_svg_ext', '.svg' ),
  5137. );
  5138. $version = 'ver=' . get_bloginfo( 'version' );
  5139. $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/javascript"';
  5140. if ( SCRIPT_DEBUG ) {
  5141. $settings['source'] = array(
  5142. /** This filter is documented in wp-includes/class.wp-scripts.php */
  5143. 'wpemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji.js?$version" ), 'wpemoji' ),
  5144. /** This filter is documented in wp-includes/class.wp-scripts.php */
  5145. 'twemoji' => apply_filters( 'script_loader_src', includes_url( "js/twemoji.js?$version" ), 'twemoji' ),
  5146. );
  5147. ?>
  5148. <script<?php echo $type_attr; ?>>
  5149. window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>;
  5150. <?php readfile( ABSPATH . WPINC . '/js/wp-emoji-loader.js' ); ?>
  5151. </script>
  5152. <?php
  5153. } else {
  5154. $settings['source'] = array(
  5155. /** This filter is documented in wp-includes/class.wp-scripts.php */
  5156. 'concatemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji-release.min.js?$version" ), 'concatemoji' ),
  5157. );
  5158. /*
  5159. * If you're looking at a src version of this file, you'll see an "include"
  5160. * statement below. This is used by the `npm run build` process to directly
  5161. * include a minified version of wp-emoji-loader.js, instead of using the
  5162. * readfile() method from above.
  5163. *
  5164. * If you're looking at a build version of this file, you'll see a string of
  5165. * minified JavaScript. If you need to debug it, please turn on SCRIPT_DEBUG
  5166. * and edit wp-emoji-loader.js directly.
  5167. */
  5168. ?>
  5169. <script<?php echo $type_attr; ?>>
  5170. window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>;
  5171. !function(e,a,t){var r,n,o,i,p=a.createElement("canvas"),s=p.getContext&&p.getContext("2d");function c(e,t){var a=String.fromCharCode;s.clearRect(0,0,p.width,p.height),s.fillText(a.apply(this,e),0,0);var r=p.toDataURL();return s.clearRect(0,0,p.width,p.height),s.fillText(a.apply(this,t),0,0),r===p.toDataURL()}function l(e){if(!s||!s.fillText)return!1;switch(s.textBaseline="top",s.font="600 32px Arial",e){case"flag":return!c([127987,65039,8205,9895,65039],[127987,65039,8203,9895,65039])&&(!c([55356,56826,55356,56819],[55356,56826,8203,55356,56819])&&!c([55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447],[55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447]));case"emoji":return!c([55357,56424,55356,57342,8205,55358,56605,8205,55357,56424,55356,57340],[55357,56424,55356,57342,8203,55358,56605,8203,55357,56424,55356,57340])}return!1}function d(e){var t=a.createElement("script");t.src=e,t.defer=t.type="text/javascript",a.getElementsByTagName("head")[0].appendChild(t)}for(i=Array("flag","emoji"),t.supports={everything:!0,everythingExceptFlag:!0},o=0;o<i.length;o++)t.supports[i[o]]=l(i[o]),t.supports.everything=t.supports.everything&&t.supports[i[o]],"flag"!==i[o]&&(t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&t.supports[i[o]]);t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&!t.supports.flag,t.DOMReady=!1,t.readyCallback=function(){t.DOMReady=!0},t.supports.everything||(n=function(){t.readyCallback()},a.addEventListener?(a.addEventListener("DOMContentLoaded",n,!1),e.addEventListener("load",n,!1)):(e.attachEvent("onload",n),a.attachEvent("onreadystatechange",function(){"complete"===a.readyState&&t.readyCallback()})),(r=t.source||{}).concatemoji?d(r.concatemoji):r.wpemoji&&r.twemoji&&(d(r.twemoji),d(r.wpemoji)))}(window,document,window._wpemojiSettings);
  5172. </script>
  5173. <?php
  5174. }
  5175. }
  5176. /**
  5177. * Convert emoji characters to their equivalent HTML entity.
  5178. *
  5179. * This allows us to store emoji in a DB using the utf8 character set.
  5180. *
  5181. * @since 4.2.0
  5182. *
  5183. * @param string $content The content to encode.
  5184. * @return string The encoded content.
  5185. */
  5186. function wp_encode_emoji( $content ) {
  5187. $emoji = _wp_emoji_list( 'partials' );
  5188. foreach ( $emoji as $emojum ) {
  5189. $emoji_char = html_entity_decode( $emojum );
  5190. if ( false !== strpos( $content, $emoji_char ) ) {
  5191. $content = preg_replace( "/$emoji_char/", $emojum, $content );
  5192. }
  5193. }
  5194. return $content;
  5195. }
  5196. /**
  5197. * Convert emoji to a static img element.
  5198. *
  5199. * @since 4.2.0
  5200. *
  5201. * @param string $text The content to encode.
  5202. * @return string The encoded content.
  5203. */
  5204. function wp_staticize_emoji( $text ) {
  5205. if ( false === strpos( $text, '&#x' ) ) {
  5206. if ( ( function_exists( 'mb_check_encoding' ) && mb_check_encoding( $text, 'ASCII' ) ) || ! preg_match( '/[^\x00-\x7F]/', $text ) ) {
  5207. // The text doesn't contain anything that might be emoji, so we can return early.
  5208. return $text;
  5209. } else {
  5210. $encoded_text = wp_encode_emoji( $text );
  5211. if ( $encoded_text === $text ) {
  5212. return $encoded_text;
  5213. }
  5214. $text = $encoded_text;
  5215. }
  5216. }
  5217. $emoji = _wp_emoji_list( 'entities' );
  5218. // Quickly narrow down the list of emoji that might be in the text and need replacing.
  5219. $possible_emoji = array();
  5220. foreach ( $emoji as $emojum ) {
  5221. if ( false !== strpos( $text, $emojum ) ) {
  5222. $possible_emoji[ $emojum ] = html_entity_decode( $emojum );
  5223. }
  5224. }
  5225. if ( ! $possible_emoji ) {
  5226. return $text;
  5227. }
  5228. /** This filter is documented in wp-includes/formatting.php */
  5229. $cdn_url = apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/12.0.0-1/72x72/' );
  5230. /** This filter is documented in wp-includes/formatting.php */
  5231. $ext = apply_filters( 'emoji_ext', '.png' );
  5232. $output = '';
  5233. /*
  5234. * HTML loop taken from smiley function, which was taken from texturize function.
  5235. * It'll never be consolidated.
  5236. *
  5237. * First, capture the tags as well as in between.
  5238. */
  5239. $textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE );
  5240. $stop = count( $textarr );
  5241. // Ignore processing of specific tags.
  5242. $tags_to_ignore = 'code|pre|style|script|textarea';
  5243. $ignore_block_element = '';
  5244. for ( $i = 0; $i < $stop; $i++ ) {
  5245. $content = $textarr[ $i ];
  5246. // If we're in an ignore block, wait until we find its closing tag.
  5247. if ( '' == $ignore_block_element && preg_match( '/^<(' . $tags_to_ignore . ')>/', $content, $matches ) ) {
  5248. $ignore_block_element = $matches[1];
  5249. }
  5250. // If it's not a tag and not in ignore block.
  5251. if ( '' == $ignore_block_element && strlen( $content ) > 0 && '<' != $content[0] && false !== strpos( $content, '&#x' ) ) {
  5252. foreach ( $possible_emoji as $emojum => $emoji_char ) {
  5253. if ( false === strpos( $content, $emojum ) ) {
  5254. continue;
  5255. }
  5256. $file = str_replace( ';&#x', '-', $emojum );
  5257. $file = str_replace( array( '&#x', ';' ), '', $file );
  5258. $entity = sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="height: 1em; max-height: 1em;" />', $cdn_url . $file . $ext, $emoji_char );
  5259. $content = str_replace( $emojum, $entity, $content );
  5260. }
  5261. }
  5262. // Did we exit ignore block.
  5263. if ( '' != $ignore_block_element && '</' . $ignore_block_element . '>' == $content ) {
  5264. $ignore_block_element = '';
  5265. }
  5266. $output .= $content;
  5267. }
  5268. // Finally, remove any stray U+FE0F characters
  5269. $output = str_replace( '&#xfe0f;', '', $output );
  5270. return $output;
  5271. }
  5272. /**
  5273. * Convert emoji in emails into static images.
  5274. *
  5275. * @since 4.2.0
  5276. *
  5277. * @param array $mail The email data array.
  5278. * @return array The email data array, with emoji in the message staticized.
  5279. */
  5280. function wp_staticize_emoji_for_email( $mail ) {
  5281. if ( ! isset( $mail['message'] ) ) {
  5282. return $mail;
  5283. }
  5284. /*
  5285. * We can only transform the emoji into images if it's a text/html email.
  5286. * To do that, here's a cut down version of the same process that happens
  5287. * in wp_mail() - get the Content-Type from the headers, if there is one,
  5288. * then pass it through the wp_mail_content_type filter, in case a plugin
  5289. * is handling changing the Content-Type.
  5290. */
  5291. $headers = array();
  5292. if ( isset( $mail['headers'] ) ) {
  5293. if ( is_array( $mail['headers'] ) ) {
  5294. $headers = $mail['headers'];
  5295. } else {
  5296. $headers = explode( "\n", str_replace( "\r\n", "\n", $mail['headers'] ) );
  5297. }
  5298. }
  5299. foreach ( $headers as $header ) {
  5300. if ( strpos( $header, ':' ) === false ) {
  5301. continue;
  5302. }
  5303. // Explode them out.
  5304. list( $name, $content ) = explode( ':', trim( $header ), 2 );
  5305. // Cleanup crew.
  5306. $name = trim( $name );
  5307. $content = trim( $content );
  5308. if ( 'content-type' === strtolower( $name ) ) {
  5309. if ( strpos( $content, ';' ) !== false ) {
  5310. list( $type, $charset ) = explode( ';', $content );
  5311. $content_type = trim( $type );
  5312. } else {
  5313. $content_type = trim( $content );
  5314. }
  5315. break;
  5316. }
  5317. }
  5318. // Set Content-Type if we don't have a content-type from the input headers.
  5319. if ( ! isset( $content_type ) ) {
  5320. $content_type = 'text/plain';
  5321. }
  5322. /** This filter is documented in wp-includes/pluggable.php */
  5323. $content_type = apply_filters( 'wp_mail_content_type', $content_type );
  5324. if ( 'text/html' === $content_type ) {
  5325. $mail['message'] = wp_staticize_emoji( $mail['message'] );
  5326. }
  5327. return $mail;
  5328. }
  5329. /**
  5330. * Returns arrays of emoji data.
  5331. *
  5332. * These arrays are automatically built from the regex in twemoji.js - if they need to be updated,
  5333. * you should update the regex there, then run the `npm run grunt precommit:emoji` job.
  5334. *
  5335. * @since 4.9.0
  5336. * @access private
  5337. *
  5338. * @param string $type Optional. Which array type to return. Accepts 'partials' or 'entities', default 'entities'.
  5339. * @return array An array to match all emoji that WordPress recognises.
  5340. */
  5341. function _wp_emoji_list( $type = 'entities' ) {
  5342. // Do not remove the START/END comments - they're used to find where to insert the arrays.
  5343. // START: emoji arrays
  5344. $entities = array( '&#x1f469;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f48b;&#x200d;&#x1f469;', '&#x1f469;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f48b;&#x200d;&#x1f468;', '&#x1f468;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f48b;&#x200d;&#x1f468;', '&#x1f3f4;&#xe0067;&#xe0062;&#xe0077;&#xe006c;&#xe0073;&#xe007f;', '&#x1f3f4;&#xe0067;&#xe0062;&#xe0073;&#xe0063;&#xe0074;&#xe007f;', '&#x1f3f4;&#xe0067;&#xe0062;&#xe0065;&#xe006e;&#xe0067;&#xe007f;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fb;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fc;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fd;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f469;&#x1f3fc;', '&#x1f9d1;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3ff;', '&#x1f9d1;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fe;', '&#x1f9d1;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fd;', '&#x1f9d1;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fc;', '&#x1f9d1;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fb;', '&#x1f9d1;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fe;', '&#x1f9d1;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fd;', '&#x1f9d1;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fc;', '&#x1f9d1;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fb;', '&#x1f9d1;&#x1f3fd;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fd;', '&#x1f9d1;&#x1f3fd;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fc;', '&#x1f9d1;&#x1f3fd;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fb;', '&#x1f9d1;&#x1f3fc;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fc;', '&#x1f9d1;&#x1f3fc;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fb;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fb;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fc;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fd;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fe;', '&#x1f9d1;&#x1f3fb;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;&#x1f3fb;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f469;&#x1f3fb;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fe;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fd;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fc;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fb;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f469;&#x1f3fd;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fb;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f469;&#x1f3fe;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f469;&#x1f3fc;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f469;&#x1f3fb;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f91d;&#x200d;&#x1f469;&#x1f3fd;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fb;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fc;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fc;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fd;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fe;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3ff;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fb;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fd;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fe;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3ff;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f91d;&#x200d;&#x1f469;&#x1f3fb;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fb;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fc;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fe;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3ff;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f91d;&#x200d;&#x1f469;&#x1f3fb;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f91d;&#x200d;&#x1f469;&#x1f3fc;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fb;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fc;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3fd;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f91d;&#x200d;&#x1f468;&#x1f3ff;', '&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f467;', '&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f466;', '&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f466;&#x200d;&#x1f466;', '&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f467;&#x200d;&#x1f467;', '&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f467;&#x200d;&#x1f466;', '&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f466;', '&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f466;&#x200d;&#x1f466;', '&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f467;', '&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f466;&#x200d;&#x1f466;', '&#x1f469;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f468;', '&#x1f468;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f468;', '&#x1f469;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f469;', '&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f466;', '&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f467;', '&#x1f469;&#x200d;&#x1f466;&#x200d;&#x1f466;', '&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f466;', '&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f467;', '&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f467;', '&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f466;', '&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f466;', '&#x1f468;&#x200d;&#x1f467;&#x200d;&#x1f467;', '&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f467;', '&#x1f468;&#x200d;&#x1f467;&#x200d;&#x1f466;', '&#x1f468;&#x200d;&#x1f466;&#x200d;&#x1f466;', '&#x1f9d1;&#x200d;&#x1f91d;&#x200d;&#x1f9d1;', '&#x1f939;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9da;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f9da;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f9da;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9da;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f3c3;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9da;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9da;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9da;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9da;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9da;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d9;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d9;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f468;&#x1f3fc;&#x200d;&#x2695;&#xfe0f;', '&#x1f468;&#x1f3fc;&#x200d;&#x2696;&#xfe0f;', '&#x1f468;&#x1f3fc;&#x200d;&#x2708;&#xfe0f;', '&#x1f9d9;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d9;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d9;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d9;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d9;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d9;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d9;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d9;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d8;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d8;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d8;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d8;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d8;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f3c3;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f3c3;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d8;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d8;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d8;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d8;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d8;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d7;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d7;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f468;&#x1f3fd;&#x200d;&#x2695;&#xfe0f;', '&#x1f468;&#x1f3fd;&#x200d;&#x2696;&#xfe0f;', '&#x1f468;&#x1f3fd;&#x200d;&#x2708;&#xfe0f;', '&#x1f9d7;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d7;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d7;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d7;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d7;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d7;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d7;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d7;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d6;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d6;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d6;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d6;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d6;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f3c3;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f3c3;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f3c3;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d6;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d6;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d6;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d6;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d6;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f3c4;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f3c4;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f468;&#x1f3fe;&#x200d;&#x2695;&#xfe0f;', '&#x1f468;&#x1f3fe;&#x200d;&#x2696;&#xfe0f;', '&#x1f468;&#x1f3fe;&#x200d;&#x2708;&#xfe0f;', '&#x1f3c4;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f3c4;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f3c4;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f3c4;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f3c4;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f3c4;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f3c4;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f3c4;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f3ca;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f3ca;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f3ca;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f3ca;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f3ca;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f3ca;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f3ca;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f3ca;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f3ca;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f3ca;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cf;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cf;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f9cf;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cf;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9cf;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cf;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f468;&#x1f3ff;&#x200d;&#x2695;&#xfe0f;', '&#x1f468;&#x1f3ff;&#x200d;&#x2696;&#xfe0f;', '&#x1f468;&#x1f3ff;&#x200d;&#x2708;&#xfe0f;', '&#x1f9cf;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cf;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9cf;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cf;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9ce;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f9ce;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f9ce;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cb;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9ce;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f3cb;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cb;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9ce;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cb;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cb;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f3cb;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cb;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f3cb;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cb;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f3cb;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cc;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f3cc;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cc;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9ce;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9ce;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9ce;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9ce;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9ce;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9cd;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cd;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f9cd;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cd;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9cd;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cd;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9cd;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cd;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9cd;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cd;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b9;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cc;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cc;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b9;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b9;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f9b9;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b9;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f9b9;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b9;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9b9;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b9;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9b9;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b8;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f9b8;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b8;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f9b8;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f3cc;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cc;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f3cc;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cc;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b8;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f9b8;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b8;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9b8;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b8;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9b8;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f93e;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f469;&#x1f3fb;&#x200d;&#x2695;&#xfe0f;', '&#x1f469;&#x1f3fb;&#x200d;&#x2696;&#xfe0f;', '&#x1f469;&#x1f3fb;&#x200d;&#x2708;&#xfe0f;', '&#x1f93e;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f93e;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f93e;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f93e;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f93e;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f93e;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f93e;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f93e;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f93e;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f93d;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f93d;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f93d;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f93d;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f3cc;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f64d;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f3c3;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f3c3;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9dd;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f93d;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f93d;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f93d;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f93d;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f93d;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f93d;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f939;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f469;&#x1f3fc;&#x200d;&#x2695;&#xfe0f;', '&#x1f469;&#x1f3fc;&#x200d;&#x2696;&#xfe0f;', '&#x1f469;&#x1f3fc;&#x200d;&#x2708;&#xfe0f;', '&#x1f939;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f939;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f939;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f939;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f939;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f939;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f939;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f939;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f3c3;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f938;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f938;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f938;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f938;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9dd;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f9dd;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f9dd;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9dd;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f9dd;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9dd;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f938;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f938;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f938;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f938;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f938;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f938;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f937;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f469;&#x1f3fd;&#x200d;&#x2695;&#xfe0f;', '&#x1f469;&#x1f3fd;&#x200d;&#x2696;&#xfe0f;', '&#x1f469;&#x1f3fd;&#x200d;&#x2708;&#xfe0f;', '&#x1f937;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f937;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f937;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f937;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f937;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f937;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f937;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f937;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f937;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f935;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f935;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f935;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f935;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9dd;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9dd;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9dd;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9dc;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f9dc;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f9dc;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f9dc;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f935;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f935;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f935;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f935;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f935;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f935;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f926;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f469;&#x1f3fe;&#x200d;&#x2695;&#xfe0f;', '&#x1f469;&#x1f3fe;&#x200d;&#x2696;&#xfe0f;', '&#x1f469;&#x1f3fe;&#x200d;&#x2708;&#xfe0f;', '&#x1f926;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f926;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f926;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f926;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f926;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f926;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f926;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f926;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f926;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b6;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b6;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b6;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b6;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9dc;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f9dc;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9dc;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9dc;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9dc;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9dc;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9db;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f9db;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b6;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b6;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b6;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b6;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b6;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b6;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b5;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f469;&#x1f3ff;&#x200d;&#x2695;&#xfe0f;', '&#x1f469;&#x1f3ff;&#x200d;&#x2696;&#xfe0f;', '&#x1f469;&#x1f3ff;&#x200d;&#x2708;&#xfe0f;', '&#x1f6b5;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b5;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b5;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b5;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b5;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b5;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b5;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f468;&#x1f3fb;&#x200d;&#x2695;&#xfe0f;', '&#x1f6b5;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f468;&#x1f3fb;&#x200d;&#x2696;&#xfe0f;', '&#x1f468;&#x1f3fb;&#x200d;&#x2708;&#xfe0f;', '&#x1f6b5;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9db;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f9db;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f9db;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f9db;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9db;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b4;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b4;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b4;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b4;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b4;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b4;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b4;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b4;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b4;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b4;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f6a3;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f6a3;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f6a3;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f6a3;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f6a3;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f6a3;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9db;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9db;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f9db;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f9da;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f46e;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f46e;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f46e;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f46e;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f46e;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f46e;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f46e;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f46e;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f46e;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f46e;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f6a3;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f6a3;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f6a3;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f6a3;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f471;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f471;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f471;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f471;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f471;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f471;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f471;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f471;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f471;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f471;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f64e;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f64e;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f473;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f473;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f473;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f473;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f473;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f473;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f473;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f473;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f473;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f473;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f64e;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f64e;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f477;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f477;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f477;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f477;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f477;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f477;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f477;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f477;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f477;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f477;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f64e;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f3c3;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f481;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f481;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f481;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f481;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f481;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f481;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f481;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f481;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f481;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f481;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f64e;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f64e;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f482;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f482;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f482;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f482;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f482;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f482;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f482;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f482;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f482;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f482;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f64e;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f64e;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f486;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f486;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f486;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f486;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f486;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f486;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f486;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f486;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f486;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f486;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f64e;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f64d;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f487;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f487;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f487;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f487;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f487;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f487;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f487;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f487;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f487;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f487;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f64d;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f64d;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f574;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f574;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f574;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f574;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f574;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f574;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f574;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f574;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f574;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f574;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f575;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f575;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f575;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f575;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f575;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f575;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f575;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f575;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f575;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f575;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f645;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f645;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f645;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f645;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f645;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f645;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f645;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f645;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f645;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f645;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f64d;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f64d;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f646;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f646;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f646;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f646;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f646;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f646;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f646;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f646;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f646;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f646;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f64d;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f64d;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f647;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f647;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f647;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f647;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f647;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f647;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f647;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f647;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f647;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f647;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x1f64d;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f64d;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f64b;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x1f64b;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f64b;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x1f64b;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f64b;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x1f64b;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x1f64b;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f64b;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x1f64b;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x1f64b;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x26f9;&#x1f3fc;&#x200d;&#x2640;&#xfe0f;', '&#x26f9;&#x1f3fd;&#x200d;&#x2640;&#xfe0f;', '&#x26f9;&#x1f3fd;&#x200d;&#x2642;&#xfe0f;', '&#x26f9;&#x1f3fc;&#x200d;&#x2642;&#xfe0f;', '&#x1f3cb;&#xfe0f;&#x200d;&#x2640;&#xfe0f;', '&#x1f3cb;&#xfe0f;&#x200d;&#x2642;&#xfe0f;', '&#x1f575;&#xfe0f;&#x200d;&#x2640;&#xfe0f;', '&#x1f575;&#xfe0f;&#x200d;&#x2642;&#xfe0f;', '&#x26f9;&#x1f3fe;&#x200d;&#x2640;&#xfe0f;', '&#x1f3cc;&#xfe0f;&#x200d;&#x2640;&#xfe0f;', '&#x1f3cc;&#xfe0f;&#x200d;&#x2642;&#xfe0f;', '&#x26f9;&#x1f3fb;&#x200d;&#x2642;&#xfe0f;', '&#x1f574;&#xfe0f;&#x200d;&#x2640;&#xfe0f;', '&#x1f574;&#xfe0f;&#x200d;&#x2642;&#xfe0f;', '&#x1f3f3;&#xfe0f;&#x200d;&#x26a7;&#xfe0f;', '&#x26f9;&#x1f3fb;&#x200d;&#x2640;&#xfe0f;', '&#x26f9;&#x1f3fe;&#x200d;&#x2642;&#xfe0f;', '&#x26f9;&#x1f3ff;&#x200d;&#x2640;&#xfe0f;', '&#x26f9;&#x1f3ff;&#x200d;&#x2642;&#xfe0f;', '&#x26f9;&#xfe0f;&#x200d;&#x2642;&#xfe0f;', '&#x26f9;&#xfe0f;&#x200d;&#x2640;&#xfe0f;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f4bc;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f3eb;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f33e;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f373;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f393;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f3a4;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f3a8;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f3eb;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f9bd;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f9bc;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f9b3;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f9b2;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f9b1;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f9b0;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f9af;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f692;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f680;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f52c;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f527;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f4bc;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f4bb;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f3ed;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f3eb;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f3a8;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f3a4;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f393;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f373;', '&#x1f469;&#x1f3ff;&#x200d;&#x1f33e;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f9bd;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f9bc;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f9b3;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f9b2;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f9b1;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f9b0;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f9af;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f692;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f680;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f52c;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f527;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f4bc;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f4bb;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f3ed;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f3eb;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f3a8;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f3a4;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f393;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f373;', '&#x1f469;&#x1f3fe;&#x200d;&#x1f33e;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f9bd;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f9bc;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f9b3;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f9b2;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f9b1;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f9b0;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f9af;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f692;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f680;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f52c;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f527;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f4bc;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f4bb;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f3ed;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f3eb;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f3a8;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f3a4;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f393;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f373;', '&#x1f469;&#x1f3fd;&#x200d;&#x1f33e;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f9bd;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f9bc;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f9b3;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f9b2;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f9b1;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f9b0;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f9af;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f692;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f680;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f52c;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f527;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f4bc;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f4bb;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f3ed;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f3eb;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f3a8;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f3a4;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f393;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f373;', '&#x1f469;&#x1f3fc;&#x200d;&#x1f33e;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f9bd;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f9bc;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f9b3;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f9b2;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f9b1;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f9b0;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f9af;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f692;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f680;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f52c;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f527;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f3ed;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f4bb;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f3eb;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f3a8;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f3a4;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f393;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f373;', '&#x1f469;&#x1f3fb;&#x200d;&#x1f33e;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f3ed;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f4bb;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f4bc;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f527;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f52c;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f680;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f692;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f9af;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f9b0;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f9b1;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f9b2;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f9b3;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f9bc;', '&#x1f468;&#x1f3fb;&#x200d;&#x1f9bd;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f33e;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f373;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f393;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f3a4;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f9bd;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f9bc;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f9b3;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f9b2;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f9b1;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f9b0;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f9af;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f692;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f680;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f52c;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f527;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f4bc;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f4bb;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f3ed;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f3eb;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f3a8;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f3a4;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f393;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f373;', '&#x1f468;&#x1f3ff;&#x200d;&#x1f33e;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f9bd;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f9bc;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f9b3;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f9b2;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f9b1;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f9b0;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f9af;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f692;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f680;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f52c;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f527;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f4bc;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f4bb;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f3ed;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f3eb;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f3a8;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f3a4;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f393;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f373;', '&#x1f468;&#x1f3fe;&#x200d;&#x1f33e;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f9bd;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f9bc;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f9b3;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f9b2;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f9b1;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f9b0;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f9af;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f692;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f680;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f52c;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f527;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f4bc;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f4bb;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f3ed;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f3eb;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f3a8;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f3a4;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f393;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f373;', '&#x1f468;&#x1f3fd;&#x200d;&#x1f33e;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f9bd;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f9bc;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f9b3;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f9b2;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f9b1;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f9b0;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f9af;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f692;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f680;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f52c;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f527;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f4bc;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f4bb;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f3ed;', '&#x1f468;&#x1f3fc;&#x200d;&#x1f3a8;', '&#x1f3f3;&#xfe0f;&#x200d;&#x1f308;', '&#x1f64d;&#x200d;&#x2640;&#xfe0f;', '&#x1f64d;&#x200d;&#x2642;&#xfe0f;', '&#x1f9ce;&#x200d;&#x2640;&#xfe0f;', '&#x1f9ce;&#x200d;&#x2642;&#xfe0f;', '&#x1f486;&#x200d;&#x2640;&#xfe0f;', '&#x1f482;&#x200d;&#x2642;&#xfe0f;', '&#x1f482;&#x200d;&#x2640;&#xfe0f;', '&#x1f481;&#x200d;&#x2642;&#xfe0f;', '&#x1f481;&#x200d;&#x2640;&#xfe0f;', '&#x1f477;&#x200d;&#x2640;&#xfe0f;', '&#x1f473;&#x200d;&#x2642;&#xfe0f;', '&#x1f473;&#x200d;&#x2640;&#xfe0f;', '&#x1f939;&#x200d;&#x2640;&#xfe0f;', '&#x1f939;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cf;&#x200d;&#x2640;&#xfe0f;', '&#x1f9cf;&#x200d;&#x2642;&#xfe0f;', '&#x1f93c;&#x200d;&#x2640;&#xfe0f;', '&#x1f93c;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b6;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b6;&#x200d;&#x2642;&#xfe0f;', '&#x1f471;&#x200d;&#x2642;&#xfe0f;', '&#x1f471;&#x200d;&#x2640;&#xfe0f;', '&#x1f64e;&#x200d;&#x2640;&#xfe0f;', '&#x1f64e;&#x200d;&#x2642;&#xfe0f;', '&#x1f46f;&#x200d;&#x2642;&#xfe0f;', '&#x1f46f;&#x200d;&#x2640;&#xfe0f;', '&#x1f46e;&#x200d;&#x2642;&#xfe0f;', '&#x1f46e;&#x200d;&#x2640;&#xfe0f;', '&#x1f93d;&#x200d;&#x2640;&#xfe0f;', '&#x1f93d;&#x200d;&#x2642;&#xfe0f;', '&#x1f469;&#x200d;&#x2708;&#xfe0f;', '&#x1f469;&#x200d;&#x2696;&#xfe0f;', '&#x1f926;&#x200d;&#x2640;&#xfe0f;', '&#x1f926;&#x200d;&#x2642;&#xfe0f;', '&#x1f469;&#x200d;&#x2695;&#xfe0f;', '&#x1f3c3;&#x200d;&#x2640;&#xfe0f;', '&#x1f3c3;&#x200d;&#x2642;&#xfe0f;', '&#x1f3c4;&#x200d;&#x2640;&#xfe0f;', '&#x1f6a3;&#x200d;&#x2640;&#xfe0f;', '&#x1f6a3;&#x200d;&#x2642;&#xfe0f;', '&#x1f93e;&#x200d;&#x2640;&#xfe0f;', '&#x1f93e;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d6;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d6;&#x200d;&#x2642;&#xfe0f;', '&#x1f3c4;&#x200d;&#x2642;&#xfe0f;', '&#x1f3ca;&#x200d;&#x2640;&#xfe0f;', '&#x1f3ca;&#x200d;&#x2642;&#xfe0f;', '&#x1f64b;&#x200d;&#x2642;&#xfe0f;', '&#x1f935;&#x200d;&#x2640;&#xfe0f;', '&#x1f935;&#x200d;&#x2642;&#xfe0f;', '&#x1f647;&#x200d;&#x2642;&#xfe0f;', '&#x1f647;&#x200d;&#x2640;&#xfe0f;', '&#x1f3f4;&#x200d;&#x2620;&#xfe0f;', '&#x1f9df;&#x200d;&#x2642;&#xfe0f;', '&#x1f9d7;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d7;&#x200d;&#x2642;&#xfe0f;', '&#x1f9b8;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b8;&#x200d;&#x2642;&#xfe0f;', '&#x1f9df;&#x200d;&#x2640;&#xfe0f;', '&#x1f9de;&#x200d;&#x2642;&#xfe0f;', '&#x1f64b;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b4;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b4;&#x200d;&#x2642;&#xfe0f;', '&#x1f9de;&#x200d;&#x2640;&#xfe0f;', '&#x1f9dd;&#x200d;&#x2642;&#xfe0f;', '&#x1f937;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d8;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d8;&#x200d;&#x2642;&#xfe0f;', '&#x1f937;&#x200d;&#x2642;&#xfe0f;', '&#x1f468;&#x200d;&#x2708;&#xfe0f;', '&#x1f9b9;&#x200d;&#x2640;&#xfe0f;', '&#x1f9b9;&#x200d;&#x2642;&#xfe0f;', '&#x1f468;&#x200d;&#x2696;&#xfe0f;', '&#x1f468;&#x200d;&#x2695;&#xfe0f;', '&#x1f9dd;&#x200d;&#x2640;&#xfe0f;', '&#x1f646;&#x200d;&#x2642;&#xfe0f;', '&#x1f9dc;&#x200d;&#x2642;&#xfe0f;', '&#x1f9dc;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d9;&#x200d;&#x2640;&#xfe0f;', '&#x1f9d9;&#x200d;&#x2642;&#xfe0f;', '&#x1f646;&#x200d;&#x2640;&#xfe0f;', '&#x1f645;&#x200d;&#x2642;&#xfe0f;', '&#x1f645;&#x200d;&#x2640;&#xfe0f;', '&#x1f487;&#x200d;&#x2642;&#xfe0f;', '&#x1f9cd;&#x200d;&#x2640;&#xfe0f;', '&#x1f9cd;&#x200d;&#x2642;&#xfe0f;', '&#x1f487;&#x200d;&#x2640;&#xfe0f;', '&#x1f486;&#x200d;&#x2642;&#xfe0f;', '&#x1f6b5;&#x200d;&#x2640;&#xfe0f;', '&#x1f6b5;&#x200d;&#x2642;&#xfe0f;', '&#x1f9da;&#x200d;&#x2640;&#xfe0f;', '&#x1f9da;&#x200d;&#x2642;&#xfe0f;', '&#x1f938;&#x200d;&#x2640;&#xfe0f;', '&#x1f938;&#x200d;&#x2642;&#xfe0f;', '&#x1f9db;&#x200d;&#x2642;&#xfe0f;', '&#x1f9db;&#x200d;&#x2640;&#xfe0f;', '&#x1f477;&#x200d;&#x2642;&#xfe0f;', '&#x1f468;&#x200d;&#x1f33e;', '&#x1f468;&#x200d;&#x1f393;', '&#x1f468;&#x200d;&#x1f3a4;', '&#x1f468;&#x200d;&#x1f3a8;', '&#x1f468;&#x200d;&#x1f3eb;', '&#x1f468;&#x200d;&#x1f3ed;', '&#x1f468;&#x200d;&#x1f466;', '&#x1f468;&#x200d;&#x1f467;', '&#x1f468;&#x200d;&#x1f4bb;', '&#x1f468;&#x200d;&#x1f4bc;', '&#x1f468;&#x200d;&#x1f527;', '&#x1f468;&#x200d;&#x1f52c;', '&#x1f468;&#x200d;&#x1f680;', '&#x1f468;&#x200d;&#x1f692;', '&#x1f468;&#x200d;&#x1f9af;', '&#x1f468;&#x200d;&#x1f9b0;', '&#x1f468;&#x200d;&#x1f9b1;', '&#x1f468;&#x200d;&#x1f9b2;', '&#x1f468;&#x200d;&#x1f9b3;', '&#x1f468;&#x200d;&#x1f9bc;', '&#x1f468;&#x200d;&#x1f9bd;', '&#x1f469;&#x200d;&#x1f33e;', '&#x1f468;&#x200d;&#x1f373;', '&#x1f469;&#x200d;&#x1f393;', '&#x1f469;&#x200d;&#x1f3a4;', '&#x1f469;&#x200d;&#x1f3a8;', '&#x1f469;&#x200d;&#x1f3eb;', '&#x1f441;&#x200d;&#x1f5e8;', '&#x1f415;&#x200d;&#x1f9ba;', '&#x1f469;&#x200d;&#x1f3ed;', '&#x1f469;&#x200d;&#x1f466;', '&#x1f469;&#x200d;&#x1f467;', '&#x1f469;&#x200d;&#x1f4bb;', '&#x1f469;&#x200d;&#x1f4bc;', '&#x1f469;&#x200d;&#x1f527;', '&#x1f469;&#x200d;&#x1f52c;', '&#x1f469;&#x200d;&#x1f680;', '&#x1f469;&#x200d;&#x1f692;', '&#x1f469;&#x200d;&#x1f9af;', '&#x1f469;&#x200d;&#x1f9b0;', '&#x1f469;&#x200d;&#x1f9b1;', '&#x1f469;&#x200d;&#x1f9b2;', '&#x1f469;&#x200d;&#x1f9b3;', '&#x1f469;&#x200d;&#x1f9bc;', '&#x1f469;&#x200d;&#x1f9bd;', '&#x1f469;&#x200d;&#x1f373;', '&#x1f1ed;&#x1f1f7;', '&#x1f481;&#x1f3ff;', '&#x1f1ed;&#x1f1f9;', '&#x1f1ed;&#x1f1fa;', '&#x1f1ee;&#x1f1e8;', '&#x1f1ee;&#x1f1e9;', '&#x1f482;&#x1f3fb;', '&#x1f1ee;&#x1f1ea;', '&#x1f1ee;&#x1f1f1;', '&#x1f482;&#x1f3fc;', '&#x1f1ee;&#x1f1f2;', '&#x1f1ee;&#x1f1f3;', '&#x1f482;&#x1f3fd;', '&#x1f1ee;&#x1f1f4;', '&#x1f1ee;&#x1f1f6;', '&#x1f482;&#x1f3fe;', '&#x1f1ee;&#x1f1f7;', '&#x1f1ee;&#x1f1f8;', '&#x1f482;&#x1f3ff;', '&#x1f1ee;&#x1f1f9;', '&#x1f468;&#x1f3fc;', '&#x1f483;&#x1f3fb;', '&#x1f483;&#x1f3fc;', '&#x1f483;&#x1f3fd;', '&#x1f483;&#x1f3fe;', '&#x1f483;&#x1f3ff;', '&#x1f485;&#x1f3fb;', '&#x1f485;&#x1f3fc;', '&#x1f485;&#x1f3fd;', '&#x1f485;&#x1f3fe;', '&#x1f485;&#x1f3ff;', '&#x1f1ef;&#x1f1ea;', '&#x1f1ef;&#x1f1f2;', '&#x1f486;&#x1f3fb;', '&#x1f1ef;&#x1f1f4;', '&#x1f1ef;&#x1f1f5;', '&#x1f486;&#x1f3fc;', '&#x1f1f0;&#x1f1ea;', '&#x1f1f0;&#x1f1ec;', '&#x1f486;&#x1f3fd;', '&#x1f1f0;&#x1f1ed;', '&#x1f1f0;&#x1f1ee;', '&#x1f486;&#x1f3fe;', '&#x1f1f0;&#x1f1f2;', '&#x1f1f0;&#x1f1f3;', '&#x1f486;&#x1f3ff;', '&#x1f1f0;&#x1f1f5;', '&#x1f1f0;&#x1f1f7;', '&#x1f1f0;&#x1f1fc;', '&#x1f1f0;&#x1f1fe;', '&#x1f487;&#x1f3fb;', '&#x1f1f0;&#x1f1ff;', '&#x1f1f1;&#x1f1e6;', '&#x1f487;&#x1f3fc;', '&#x1f1f1;&#x1f1e7;', '&#x1f1f1;&#x1f1e8;', '&#x1f487;&#x1f3fd;', '&#x1f1f1;&#x1f1ee;', '&#x1f1f1;&#x1f1f0;', '&#x1f487;&#x1f3fe;', '&#x1f1f1;&#x1f1f7;', '&#x1f1f1;&#x1f1f8;', '&#x1f487;&#x1f3ff;', '&#x1f1f1;&#x1f1f9;', '&#x1f1f1;&#x1f1fa;', '&#x1f4aa;&#x1f3fb;', '&#x1f4aa;&#x1f3fc;', '&#x1f4aa;&#x1f3fd;', '&#x1f4aa;&#x1f3fe;', '&#x1f4aa;&#x1f3ff;', '&#x1f1f1;&#x1f1fb;', '&#x1f468;&#x1f3fd;', '&#x1f574;&#x1f3fb;', '&#x1f1f1;&#x1f1fe;', '&#x1f1f2;&#x1f1e6;', '&#x1f574;&#x1f3fc;', '&#x1f1f2;&#x1f1e8;', '&#x1f1f2;&#x1f1e9;', '&#x1f574;&#x1f3fd;', '&#x1f1f2;&#x1f1ea;', '&#x1f1f2;&#x1f1eb;', '&#x1f574;&#x1f3fe;', '&#x1f1f2;&#x1f1ec;', '&#x1f1f2;&#x1f1ed;', '&#x1f574;&#x1f3ff;', '&#x1f1f2;&#x1f1f0;', '&#x1f1f2;&#x1f1f1;', '&#x1f1f2;&#x1f1f2;', '&#x1f1f2;&#x1f1f3;', '&#x1f575;&#x1f3fb;', '&#x1f1f2;&#x1f1f4;', '&#x1f1f2;&#x1f1f5;', '&#x1f575;&#x1f3fc;', '&#x1f1f2;&#x1f1f6;', '&#x1f1f2;&#x1f1f7;', '&#x1f575;&#x1f3fd;', '&#x1f1f2;&#x1f1f8;', '&#x1f1f2;&#x1f1f9;', '&#x1f575;&#x1f3fe;', '&#x1f1f2;&#x1f1fa;', '&#x1f1f2;&#x1f1fb;', '&#x1f575;&#x1f3ff;', '&#x1f1f2;&#x1f1fc;', '&#x1f1f2;&#x1f1fd;', '&#x1f57a;&#x1f3fb;', '&#x1f57a;&#x1f3fc;', '&#x1f57a;&#x1f3fd;', '&#x1f57a;&#x1f3fe;', '&#x1f57a;&#x1f3ff;', '&#x1f590;&#x1f3fb;', '&#x1f590;&#x1f3fc;', '&#x1f590;&#x1f3fd;', '&#x1f590;&#x1f3fe;', '&#x1f590;&#x1f3ff;', '&#x1f595;&#x1f3fb;', '&#x1f595;&#x1f3fc;', '&#x1f595;&#x1f3fd;', '&#x1f595;&#x1f3fe;', '&#x1f595;&#x1f3ff;', '&#x1f596;&#x1f3fb;', '&#x1f596;&#x1f3fc;', '&#x1f596;&#x1f3fd;', '&#x1f596;&#x1f3fe;', '&#x1f596;&#x1f3ff;', '&#x1f1f2;&#x1f1fe;', '&#x1f1f2;&#x1f1ff;', '&#x1f645;&#x1f3fb;', '&#x1f1f3;&#x1f1e6;', '&#x1f1f3;&#x1f1e8;', '&#x1f645;&#x1f3fc;', '&#x1f468;&#x1f3fe;', '&#x1f1f3;&#x1f1ea;', '&#x1f645;&#x1f3fd;', '&#x1f1f3;&#x1f1eb;', '&#x1f1f3;&#x1f1ec;', '&#x1f645;&#x1f3fe;', '&#x1f1f3;&#x1f1ee;', '&#x1f1f3;&#x1f1f1;', '&#x1f645;&#x1f3ff;', '&#x1f1f3;&#x1f1f4;', '&#x1f1f3;&#x1f1f5;', '&#x1f1f3;&#x1f1f7;', '&#x1f1f3;&#x1f1fa;', '&#x1f646;&#x1f3fb;', '&#x1f1f3;&#x1f1ff;', '&#x1f1f4;&#x1f1f2;', '&#x1f646;&#x1f3fc;', '&#x1f1f5;&#x1f1e6;', '&#x1f1f5;&#x1f1ea;', '&#x1f646;&#x1f3fd;', '&#x1f1f5;&#x1f1eb;', '&#x1f1f5;&#x1f1ec;', '&#x1f646;&#x1f3fe;', '&#x1f1f5;&#x1f1ed;', '&#x1f1f5;&#x1f1f0;', '&#x1f646;&#x1f3ff;', '&#x1f1f5;&#x1f1f1;', '&#x1f1f5;&#x1f1f2;', '&#x1f1f5;&#x1f1f3;', '&#x1f1f5;&#x1f1f7;', '&#x1f647;&#x1f3fb;', '&#x1f1f5;&#x1f1f8;', '&#x1f1f5;&#x1f1f9;', '&#x1f647;&#x1f3fc;', '&#x1f1f5;&#x1f1fc;', '&#x1f1f5;&#x1f1fe;', '&#x1f647;&#x1f3fd;', '&#x1f1f6;&#x1f1e6;', '&#x1f1f7;&#x1f1ea;', '&#x1f647;&#x1f3fe;', '&#x1f468;&#x1f3ff;', '&#x1f1f7;&#x1f1f4;', '&#x1f647;&#x1f3ff;', '&#x1f1f7;&#x1f1f8;', '&#x1f1f7;&#x1f1fa;', '&#x1f1f7;&#x1f1fc;', '&#x1f1f8;&#x1f1e6;', '&#x1f64b;&#x1f3fb;', '&#x1f1f8;&#x1f1e7;', '&#x1f1f8;&#x1f1e8;', '&#x1f64b;&#x1f3fc;', '&#x1f1f8;&#x1f1e9;', '&#x1f1f8;&#x1f1ea;', '&#x1f64b;&#x1f3fd;', '&#x1f1f8;&#x1f1ec;', '&#x1f1f8;&#x1f1ed;', '&#x1f64b;&#x1f3fe;', '&#x1f1f8;&#x1f1ee;', '&#x1f1f8;&#x1f1ef;', '&#x1f64b;&#x1f3ff;', '&#x1f1f8;&#x1f1f0;', '&#x1f1f8;&#x1f1f1;', '&#x1f64c;&#x1f3fb;', '&#x1f64c;&#x1f3fc;', '&#x1f64c;&#x1f3fd;', '&#x1f64c;&#x1f3fe;', '&#x1f64c;&#x1f3ff;', '&#x1f1f8;&#x1f1f2;', '&#x1f1f8;&#x1f1f3;', '&#x1f64d;&#x1f3fb;', '&#x1f1f8;&#x1f1f4;', '&#x1f1f8;&#x1f1f7;', '&#x1f64d;&#x1f3fc;', '&#x1f1f8;&#x1f1f8;', '&#x1f1f8;&#x1f1f9;', '&#x1f64d;&#x1f3fd;', '&#x1f1f8;&#x1f1fb;', '&#x1f1f8;&#x1f1fd;', '&#x1f64d;&#x1f3fe;', '&#x1f1f8;&#x1f1fe;', '&#x1f1f8;&#x1f1ff;', '&#x1f64d;&#x1f3ff;', '&#x1f1f9;&#x1f1e6;', '&#x1f1f9;&#x1f1e8;', '&#x1f1f9;&#x1f1e9;', '&#x1f1f9;&#x1f1eb;', '&#x1f64e;&#x1f3fb;', '&#x1f1f9;&#x1f1ec;', '&#x1f1f9;&#x1f1ed;', '&#x1f64e;&#x1f3fc;', '&#x1f1f9;&#x1f1ef;', '&#x1f1f9;&#x1f1f0;', '&#x1f64e;&#x1f3fd;', '&#x1f1f9;&#x1f1f1;', '&#x1f1f9;&#x1f1f2;', '&#x1f64e;&#x1f3fe;', '&#x1f1f9;&#x1f1f3;', '&#x1f1f9;&#x1f1f4;', '&#x1f64e;&#x1f3ff;', '&#x1f1f9;&#x1f1f7;', '&#x1f1f9;&#x1f1f9;', '&#x1f64f;&#x1f3fb;', '&#x1f64f;&#x1f3fc;', '&#x1f64f;&#x1f3fd;', '&#x1f64f;&#x1f3fe;', '&#x1f64f;&#x1f3ff;', '&#x1f1f9;&#x1f1fb;', '&#x1f1f9;&#x1f1fc;', '&#x1f6a3;&#x1f3fb;', '&#x1f1f9;&#x1f1ff;', '&#x1f1fa;&#x1f1e6;', '&#x1f6a3;&#x1f3fc;', '&#x1f1fa;&#x1f1ec;', '&#x1f1fa;&#x1f1f2;', '&#x1f6a3;&#x1f3fd;', '&#x1f1fa;&#x1f1f3;', '&#x1f1fa;&#x1f1f8;', '&#x1f6a3;&#x1f3fe;', '&#x1f1fa;&#x1f1fe;', '&#x1f1fa;&#x1f1ff;', '&#x1f6a3;&#x1f3ff;', '&#x1f1fb;&#x1f1e6;', '&#x1f1fb;&#x1f1e8;', '&#x1f1fb;&#x1f1ea;', '&#x1f1fb;&#x1f1ec;', '&#x1f6b4;&#x1f3fb;', '&#x1f1fb;&#x1f1ee;', '&#x1f1fb;&#x1f1f3;', '&#x1f6b4;&#x1f3fc;', '&#x1f1fb;&#x1f1fa;', '&#x1f1fc;&#x1f1eb;', '&#x1f6b4;&#x1f3fd;', '&#x1f1fc;&#x1f1f8;', '&#x1f1fd;&#x1f1f0;', '&#x1f6b4;&#x1f3fe;', '&#x1f1fe;&#x1f1ea;', '&#x1f1fe;&#x1f1f9;', '&#x1f6b4;&#x1f3ff;', '&#x1f1ff;&#x1f1e6;', '&#x1f1ff;&#x1f1f2;', '&#x1f1ff;&#x1f1fc;', '&#x1f385;&#x1f3fb;', '&#x1f6b5;&#x1f3fb;', '&#x1f385;&#x1f3fc;', '&#x1f385;&#x1f3fd;', '&#x1f6b5;&#x1f3fc;', '&#x1f469;&#x1f3fb;', '&#x1f385;&#x1f3fe;', '&#x1f6b5;&#x1f3fd;', '&#x1f385;&#x1f3ff;', '&#x1f3c2;&#x1f3fb;', '&#x1f6b5;&#x1f3fe;', '&#x1f3c2;&#x1f3fc;', '&#x1f3c2;&#x1f3fd;', '&#x1f6b5;&#x1f3ff;', '&#x1f3c2;&#x1f3fe;', '&#x1f3c2;&#x1f3ff;', '&#x1f44b;&#x1f3fc;', '&#x1f1e6;&#x1f1ea;', '&#x1f6b6;&#x1f3fb;', '&#x1f3c3;&#x1f3fb;', '&#x1f1e6;&#x1f1eb;', '&#x1f6b6;&#x1f3fc;', '&#x1f1e6;&#x1f1ec;', '&#x1f3c3;&#x1f3fc;', '&#x1f6b6;&#x1f3fd;', '&#x1f1e6;&#x1f1ee;', '&#x1f1e6;&#x1f1f1;', '&#x1f6b6;&#x1f3fe;', '&#x1f3c3;&#x1f3fd;', '&#x1f1e6;&#x1f1f2;', '&#x1f6b6;&#x1f3ff;', '&#x1f1e6;&#x1f1f4;', '&#x1f3c3;&#x1f3fe;', '&#x1f6c0;&#x1f3fb;', '&#x1f6c0;&#x1f3fc;', '&#x1f6c0;&#x1f3fd;', '&#x1f6c0;&#x1f3fe;', '&#x1f6c0;&#x1f3ff;', '&#x1f6cc;&#x1f3fb;', '&#x1f6cc;&#x1f3fc;', '&#x1f6cc;&#x1f3fd;', '&#x1f6cc;&#x1f3fe;', '&#x1f6cc;&#x1f3ff;', '&#x1f90f;&#x1f3fb;', '&#x1f90f;&#x1f3fc;', '&#x1f90f;&#x1f3fd;', '&#x1f90f;&#x1f3fe;', '&#x1f90f;&#x1f3ff;', '&#x1f918;&#x1f3fb;', '&#x1f918;&#x1f3fc;', '&#x1f918;&#x1f3fd;', '&#x1f918;&#x1f3fe;', '&#x1f918;&#x1f3ff;', '&#x1f919;&#x1f3fb;', '&#x1f919;&#x1f3fc;', '&#x1f919;&#x1f3fd;', '&#x1f919;&#x1f3fe;', '&#x1f919;&#x1f3ff;', '&#x1f91a;&#x1f3fb;', '&#x1f91a;&#x1f3fc;', '&#x1f91a;&#x1f3fd;', '&#x1f91a;&#x1f3fe;', '&#x1f91a;&#x1f3ff;', '&#x1f91b;&#x1f3fb;', '&#x1f91b;&#x1f3fc;', '&#x1f91b;&#x1f3fd;', '&#x1f91b;&#x1f3fe;', '&#x1f91b;&#x1f3ff;', '&#x1f91c;&#x1f3fb;', '&#x1f91c;&#x1f3fc;', '&#x1f91c;&#x1f3fd;', '&#x1f91c;&#x1f3fe;', '&#x1f91c;&#x1f3ff;', '&#x1f91e;&#x1f3fb;', '&#x1f91e;&#x1f3fc;', '&#x1f91e;&#x1f3fd;', '&#x1f91e;&#x1f3fe;', '&#x1f91e;&#x1f3ff;', '&#x1f91f;&#x1f3fb;', '&#x1f91f;&#x1f3fc;', '&#x1f91f;&#x1f3fd;', '&#x1f91f;&#x1f3fe;', '&#x1f91f;&#x1f3ff;', '&#x1f1e6;&#x1f1f6;', '&#x1f1e6;&#x1f1f7;', '&#x1f926;&#x1f3fb;', '&#x1f3c3;&#x1f3ff;', '&#x1f1e6;&#x1f1f8;', '&#x1f926;&#x1f3fc;', '&#x1f1e6;&#x1f1f9;', '&#x1f1e6;&#x1f1fa;', '&#x1f926;&#x1f3fd;', '&#x1f1e6;&#x1f1fc;', '&#x1f3c4;&#x1f3fb;', '&#x1f926;&#x1f3fe;', '&#x1f1e6;&#x1f1fd;', '&#x1f469;&#x1f3fc;', '&#x1f926;&#x1f3ff;', '&#x1f1e6;&#x1f1ff;', '&#x1f3c4;&#x1f3fc;', '&#x1f930;&#x1f3fb;', '&#x1f930;&#x1f3fc;', '&#x1f930;&#x1f3fd;', '&#x1f930;&#x1f3fe;', '&#x1f930;&#x1f3ff;', '&#x1f931;&#x1f3fb;', '&#x1f931;&#x1f3fc;', '&#x1f931;&#x1f3fd;', '&#x1f931;&#x1f3fe;', '&#x1f931;&#x1f3ff;', '&#x1f932;&#x1f3fb;', '&#x1f932;&#x1f3fc;', '&#x1f932;&#x1f3fd;', '&#x1f932;&#x1f3fe;', '&#x1f932;&#x1f3ff;', '&#x1f933;&#x1f3fb;', '&#x1f933;&#x1f3fc;', '&#x1f933;&#x1f3fd;', '&#x1f933;&#x1f3fe;', '&#x1f933;&#x1f3ff;', '&#x1f934;&#x1f3fb;', '&#x1f934;&#x1f3fc;', '&#x1f934;&#x1f3fd;', '&#x1f934;&#x1f3fe;', '&#x1f934;&#x1f3ff;', '&#x1f1e7;&#x1f1e6;', '&#x1f1e7;&#x1f1e7;', '&#x1f935;&#x1f3fb;', '&#x1f3c4;&#x1f3fd;', '&#x1f1e7;&#x1f1e9;', '&#x1f935;&#x1f3fc;', '&#x1f1e7;&#x1f1ea;', '&#x1f3c4;&#x1f3fe;', '&#x1f935;&#x1f3fd;', '&#x1f1e7;&#x1f1eb;', '&#x1f1e7;&#x1f1ec;', '&#x1f935;&#x1f3fe;', '&#x1f3c4;&#x1f3ff;', '&#x1f1e7;&#x1f1ed;', '&#x1f935;&#x1f3ff;', '&#x1f1e7;&#x1f1ee;', '&#x1f3c7;&#x1f3fb;', '&#x1f936;&#x1f3fb;', '&#x1f936;&#x1f3fc;', '&#x1f936;&#x1f3fd;', '&#x1f936;&#x1f3fe;', '&#x1f936;&#x1f3ff;', '&#x1f3c7;&#x1f3fc;', '&#x1f3c7;&#x1f3fd;', '&#x1f937;&#x1f3fb;', '&#x1f3c7;&#x1f3fe;', '&#x1f3c7;&#x1f3ff;', '&#x1f937;&#x1f3fc;', '&#x1f1e7;&#x1f1ef;', '&#x1f1e7;&#x1f1f1;', '&#x1f937;&#x1f3fd;', '&#x1f3ca;&#x1f3fb;', '&#x1f1e7;&#x1f1f2;', '&#x1f937;&#x1f3fe;', '&#x1f1e7;&#x1f1f3;', '&#x1f3ca;&#x1f3fc;', '&#x1f937;&#x1f3ff;', '&#x1f1e7;&#x1f1f4;', '&#x1f1e7;&#x1f1f6;', '&#x1f3ca;&#x1f3fd;', '&#x1f1e7;&#x1f1f7;', '&#x1f938;&#x1f3fb;', '&#x1f1e7;&#x1f1f8;', '&#x1f469;&#x1f3fd;', '&#x1f938;&#x1f3fc;', '&#x1f3ca;&#x1f3fe;', '&#x1f1e7;&#x1f1f9;', '&#x1f938;&#x1f3fd;', '&#x1f1e7;&#x1f1fb;', '&#x1f3ca;&#x1f3ff;', '&#x1f938;&#x1f3fe;', '&#x1f1e7;&#x1f1fc;', '&#x1f1e7;&#x1f1fe;', '&#x1f938;&#x1f3ff;', '&#x1f1e7;&#x1f1ff;', '&#x1f1e8;&#x1f1e6;', '&#x1f3cb;&#x1f3fb;', '&#x1f1e8;&#x1f1e8;', '&#x1f939;&#x1f3fb;', '&#x1f1e8;&#x1f1e9;', '&#x1f3cb;&#x1f3fc;', '&#x1f939;&#x1f3fc;', '&#x1f1e8;&#x1f1eb;', '&#x1f1e8;&#x1f1ec;', '&#x1f939;&#x1f3fd;', '&#x1f3cb;&#x1f3fd;', '&#x1f1e8;&#x1f1ed;', '&#x1f939;&#x1f3fe;', '&#x1f1e8;&#x1f1ee;', '&#x1f3cb;&#x1f3fe;', '&#x1f939;&#x1f3ff;', '&#x1f1e8;&#x1f1f0;', '&#x1f1e8;&#x1f1f1;', '&#x1f3cb;&#x1f3ff;', '&#x1f1e8;&#x1f1f2;', '&#x1f1e8;&#x1f1f3;', '&#x1f1e8;&#x1f1f4;', '&#x1f93d;&#x1f3fb;', '&#x1f1e8;&#x1f1f5;', '&#x1f3cc;&#x1f3fb;', '&#x1f93d;&#x1f3fc;', '&#x1f1e8;&#x1f1f7;', '&#x1f1e8;&#x1f1fa;', '&#x1f93d;&#x1f3fd;', '&#x1f3cc;&#x1f3fc;', '&#x1f1e8;&#x1f1fb;', '&#x1f93d;&#x1f3fe;', '&#x1f469;&#x1f3fe;', '&#x1f1e8;&#x1f1fc;', '&#x1f93d;&#x1f3ff;', '&#x1f3cc;&#x1f3fd;', '&#x1f1e8;&#x1f1fd;', '&#x1f1e8;&#x1f1fe;', '&#x1f3cc;&#x1f3fe;', '&#x1f93e;&#x1f3fb;', '&#x1f1e8;&#x1f1ff;', '&#x1f1e9;&#x1f1ea;', '&#x1f93e;&#x1f3fc;', '&#x1f3cc;&#x1f3ff;', '&#x1f1e9;&#x1f1ec;', '&#x1f93e;&#x1f3fd;', '&#x1f1e9;&#x1f1ef;', '&#x1f1e9;&#x1f1f0;', '&#x1f93e;&#x1f3fe;', '&#x1f1e9;&#x1f1f2;', '&#x1f1e9;&#x1f1f4;', '&#x1f93e;&#x1f3ff;', '&#x1f1e9;&#x1f1ff;', '&#x1f1ea;&#x1f1e6;', '&#x1f9b5;&#x1f3fb;', '&#x1f9b5;&#x1f3fc;', '&#x1f9b5;&#x1f3fd;', '&#x1f9b5;&#x1f3fe;', '&#x1f9b5;&#x1f3ff;', '&#x1f9b6;&#x1f3fb;', '&#x1f9b6;&#x1f3fc;', '&#x1f9b6;&#x1f3fd;', '&#x1f9b6;&#x1f3fe;', '&#x1f9b6;&#x1f3ff;', '&#x1f1ea;&#x1f1e8;', '&#x1f1ea;&#x1f1ea;', '&#x1f9b8;&#x1f3fb;', '&#x1f1ea;&#x1f1ec;', '&#x1f442;&#x1f3fb;', '&#x1f9b8;&#x1f3fc;', '&#x1f442;&#x1f3fc;', '&#x1f442;&#x1f3fd;', '&#x1f9b8;&#x1f3fd;', '&#x1f442;&#x1f3fe;', '&#x1f442;&#x1f3ff;', '&#x1f9b8;&#x1f3fe;', '&#x1f443;&#x1f3fb;', '&#x1f443;&#x1f3fc;', '&#x1f9b8;&#x1f3ff;', '&#x1f443;&#x1f3fd;', '&#x1f443;&#x1f3fe;', '&#x1f443;&#x1f3ff;', '&#x1f446;&#x1f3fb;', '&#x1f9b9;&#x1f3fb;', '&#x1f446;&#x1f3fc;', '&#x1f446;&#x1f3fd;', '&#x1f9b9;&#x1f3fc;', '&#x1f469;&#x1f3ff;', '&#x1f446;&#x1f3fe;', '&#x1f9b9;&#x1f3fd;', '&#x1f446;&#x1f3ff;', '&#x1f447;&#x1f3fb;', '&#x1f9b9;&#x1f3fe;', '&#x1f447;&#x1f3fc;', '&#x1f447;&#x1f3fd;', '&#x1f9b9;&#x1f3ff;', '&#x1f447;&#x1f3fe;', '&#x1f447;&#x1f3ff;', '&#x1f9bb;&#x1f3fb;', '&#x1f9bb;&#x1f3fc;', '&#x1f9bb;&#x1f3fd;', '&#x1f9bb;&#x1f3fe;', '&#x1f9bb;&#x1f3ff;', '&#x1f448;&#x1f3fb;', '&#x1f448;&#x1f3fc;', '&#x1f9cd;&#x1f3fb;', '&#x1f448;&#x1f3fd;', '&#x1f448;&#x1f3fe;', '&#x1f9cd;&#x1f3fc;', '&#x1f448;&#x1f3ff;', '&#x1f449;&#x1f3fb;', '&#x1f9cd;&#x1f3fd;', '&#x1f449;&#x1f3fc;', '&#x1f449;&#x1f3fd;', '&#x1f9cd;&#x1f3fe;', '&#x1f449;&#x1f3fe;', '&#x1f449;&#x1f3ff;', '&#x1f9cd;&#x1f3ff;', '&#x1f44a;&#x1f3fb;', '&#x1f44a;&#x1f3fc;', '&#x1f44a;&#x1f3fd;', '&#x1f44a;&#x1f3fe;', '&#x1f9ce;&#x1f3fb;', '&#x1f44a;&#x1f3ff;', '&#x1f44b;&#x1f3fb;', '&#x1f9ce;&#x1f3fc;', '&#x1f1e6;&#x1f1e8;', '&#x1f44b;&#x1f3fd;', '&#x1f9ce;&#x1f3fd;', '&#x1f44b;&#x1f3fe;', '&#x1f44b;&#x1f3ff;', '&#x1f9ce;&#x1f3fe;', '&#x1f44c;&#x1f3fb;', '&#x1f44c;&#x1f3fc;', '&#x1f9ce;&#x1f3ff;', '&#x1f44c;&#x1f3fd;', '&#x1f44c;&#x1f3fe;', '&#x1f44c;&#x1f3ff;', '&#x1f44d;&#x1f3fb;', '&#x1f9cf;&#x1f3fb;', '&#x1f44d;&#x1f3fc;', '&#x1f44d;&#x1f3fd;', '&#x1f9cf;&#x1f3fc;', '&#x1f44d;&#x1f3fe;', '&#x1f44d;&#x1f3ff;', '&#x1f9cf;&#x1f3fd;', '&#x1f46b;&#x1f3fb;', '&#x1f46b;&#x1f3fc;', '&#x1f9cf;&#x1f3fe;', '&#x1f46b;&#x1f3fd;', '&#x1f46b;&#x1f3fe;', '&#x1f9cf;&#x1f3ff;', '&#x1f46b;&#x1f3ff;', '&#x1f46c;&#x1f3fb;', '&#x1f46c;&#x1f3fc;', '&#x1f9d1;&#x1f3fb;', '&#x1f46c;&#x1f3fd;', '&#x1f46c;&#x1f3fe;', '&#x1f9d1;&#x1f3fc;', '&#x1f46c;&#x1f3ff;', '&#x1f46d;&#x1f3fb;', '&#x1f46d;&#x1f3fc;', '&#x1f9d1;&#x1f3fd;', '&#x1f46d;&#x1f3fd;', '&#x1f46d;&#x1f3fe;', '&#x1f46d;&#x1f3ff;', '&#x1f44e;&#x1f3fb;', '&#x1f9d1;&#x1f3fe;', '&#x1f44e;&#x1f3fc;', '&#x1f46e;&#x1f3fb;', '&#x1f44e;&#x1f3fd;', '&#x1f44e;&#x1f3fe;', '&#x1f46e;&#x1f3fc;', '&#x1f9d1;&#x1f3ff;', '&#x1f44e;&#x1f3ff;', '&#x1f9d2;&#x1f3fb;', '&#x1f9d2;&#x1f3fc;', '&#x1f9d2;&#x1f3fd;', '&#x1f9d2;&#x1f3fe;', '&#x1f9d2;&#x1f3ff;', '&#x1f9d3;&#x1f3fb;', '&#x1f9d3;&#x1f3fc;', '&#x1f9d3;&#x1f3fd;', '&#x1f9d3;&#x1f3fe;', '&#x1f9d3;&#x1f3ff;', '&#x1f9d4;&#x1f3fb;', '&#x1f9d4;&#x1f3fc;', '&#x1f9d4;&#x1f3fd;', '&#x1f9d4;&#x1f3fe;', '&#x1f9d4;&#x1f3ff;', '&#x1f9d5;&#x1f3fb;', '&#x1f9d5;&#x1f3fc;', '&#x1f9d5;&#x1f3fd;', '&#x1f9d5;&#x1f3fe;', '&#x1f9d5;&#x1f3ff;', '&#x1f44f;&#x1f3fb;', '&#x1f46e;&#x1f3fd;', '&#x1f9d6;&#x1f3fb;', '&#x1f44f;&#x1f3fc;', '&#x1f44f;&#x1f3fd;', '&#x1f9d6;&#x1f3fc;', '&#x1f46e;&#x1f3fe;', '&#x1f44f;&#x1f3fe;', '&#x1f9d6;&#x1f3fd;', '&#x1f44f;&#x1f3ff;', '&#x1f46e;&#x1f3ff;', '&#x1f9d6;&#x1f3fe;', '&#x1f450;&#x1f3fb;', '&#x1f450;&#x1f3fc;', '&#x1f9d6;&#x1f3ff;', '&#x1f450;&#x1f3fd;', '&#x1f450;&#x1f3fe;', '&#x1f470;&#x1f3fb;', '&#x1f470;&#x1f3fc;', '&#x1f9d7;&#x1f3fb;', '&#x1f470;&#x1f3fd;', '&#x1f470;&#x1f3fe;', '&#x1f9d7;&#x1f3fc;', '&#x1f470;&#x1f3ff;', '&#x1f450;&#x1f3ff;', '&#x1f9d7;&#x1f3fd;', '&#x1f466;&#x1f3fb;', '&#x1f471;&#x1f3fb;', '&#x1f9d7;&#x1f3fe;', '&#x1f466;&#x1f3fc;', '&#x1f466;&#x1f3fd;', '&#x1f9d7;&#x1f3ff;', '&#x1f471;&#x1f3fc;', '&#x1f466;&#x1f3fe;', '&#x1f466;&#x1f3ff;', '&#x1f471;&#x1f3fd;', '&#x1f9d8;&#x1f3fb;', '&#x1f467;&#x1f3fb;', '&#x1f467;&#x1f3fc;', '&#x1f9d8;&#x1f3fc;', '&#x1f471;&#x1f3fe;', '&#x1f467;&#x1f3fd;', '&#x1f9d8;&#x1f3fd;', '&#x1f467;&#x1f3fe;', '&#x1f471;&#x1f3ff;', '&#x1f9d8;&#x1f3fe;', '&#x1f467;&#x1f3ff;', '&#x1f1ea;&#x1f1ed;', '&#x1f9d8;&#x1f3ff;', '&#x1f472;&#x1f3fb;', '&#x1f472;&#x1f3fc;', '&#x1f472;&#x1f3fd;', '&#x1f472;&#x1f3fe;', '&#x1f9d9;&#x1f3fb;', '&#x1f472;&#x1f3ff;', '&#x1f1ea;&#x1f1f7;', '&#x1f9d9;&#x1f3fc;', '&#x1f1ea;&#x1f1f8;', '&#x1f473;&#x1f3fb;', '&#x1f9d9;&#x1f3fd;', '&#x1f1ea;&#x1f1f9;', '&#x1f1ea;&#x1f1fa;', '&#x1f9d9;&#x1f3fe;', '&#x1f473;&#x1f3fc;', '&#x1f1eb;&#x1f1ee;', '&#x1f9d9;&#x1f3ff;', '&#x1f1eb;&#x1f1ef;', '&#x1f473;&#x1f3fd;', '&#x1f1eb;&#x1f1f0;', '&#x1f1eb;&#x1f1f2;', '&#x1f9da;&#x1f3fb;', '&#x1f473;&#x1f3fe;', '&#x1f1eb;&#x1f1f4;', '&#x1f9da;&#x1f3fc;', '&#x1f1eb;&#x1f1f7;', '&#x1f473;&#x1f3ff;', '&#x1f9da;&#x1f3fd;', '&#x1f1ec;&#x1f1e6;', '&#x1f1ec;&#x1f1e7;', '&#x1f9da;&#x1f3fe;', '&#x1f474;&#x1f3fb;', '&#x1f474;&#x1f3fc;', '&#x1f9da;&#x1f3ff;', '&#x1f474;&#x1f3fd;', '&#x1f474;&#x1f3fe;', '&#x1f474;&#x1f3ff;', '&#x1f475;&#x1f3fb;', '&#x1f9db;&#x1f3fb;', '&#x1f475;&#x1f3fc;', '&#x1f475;&#x1f3fd;', '&#x1f9db;&#x1f3fc;', '&#x1f475;&#x1f3fe;', '&#x1f475;&#x1f3ff;', '&#x1f9db;&#x1f3fd;', '&#x1f476;&#x1f3fb;', '&#x1f476;&#x1f3fc;', '&#x1f9db;&#x1f3fe;', '&#x1f476;&#x1f3fd;', '&#x1f476;&#x1f3fe;', '&#x1f9db;&#x1f3ff;', '&#x1f476;&#x1f3ff;', '&#x1f1ec;&#x1f1e9;', '&#x1f1ec;&#x1f1ea;', '&#x1f477;&#x1f3fb;', '&#x1f9dc;&#x1f3fb;', '&#x1f1ec;&#x1f1eb;', '&#x1f1ec;&#x1f1ec;', '&#x1f9dc;&#x1f3fc;', '&#x1f477;&#x1f3fc;', '&#x1f1ec;&#x1f1ed;', '&#x1f9dc;&#x1f3fd;', '&#x1f1ec;&#x1f1ee;', '&#x1f477;&#x1f3fd;', '&#x1f9dc;&#x1f3fe;', '&#x1f1ec;&#x1f1f1;', '&#x1f1ec;&#x1f1f2;', '&#x1f9dc;&#x1f3ff;', '&#x1f477;&#x1f3fe;', '&#x1f1ec;&#x1f1f3;', '&#x1f1ec;&#x1f1f5;', '&#x1f477;&#x1f3ff;', '&#x1f9dd;&#x1f3fb;', '&#x1f468;&#x1f3fb;', '&#x1f1ec;&#x1f1f6;', '&#x1f9dd;&#x1f3fc;', '&#x1f478;&#x1f3fb;', '&#x1f478;&#x1f3fc;', '&#x1f9dd;&#x1f3fd;', '&#x1f478;&#x1f3fd;', '&#x1f478;&#x1f3fe;', '&#x1f9dd;&#x1f3fe;', '&#x1f478;&#x1f3ff;', '&#x1f47c;&#x1f3fb;', '&#x1f9dd;&#x1f3ff;', '&#x1f47c;&#x1f3fc;', '&#x1f47c;&#x1f3fd;', '&#x1f47c;&#x1f3fe;', '&#x1f47c;&#x1f3ff;', '&#x1f1ec;&#x1f1f7;', '&#x1f1ec;&#x1f1f8;', '&#x1f481;&#x1f3fb;', '&#x1f1ec;&#x1f1f9;', '&#x1f1ec;&#x1f1fa;', '&#x1f481;&#x1f3fc;', '&#x1f1ec;&#x1f1fc;', '&#x1f1ec;&#x1f1fe;', '&#x1f481;&#x1f3fd;', '&#x1f1ed;&#x1f1f0;', '&#x1f1ed;&#x1f1f2;', '&#x1f481;&#x1f3fe;', '&#x1f1ed;&#x1f1f3;', '&#x1f1e6;&#x1f1e9;', '&#x270d;&#x1f3ff;', '&#x26f9;&#x1f3fb;', '&#x270d;&#x1f3fe;', '&#x270d;&#x1f3fd;', '&#x270d;&#x1f3fc;', '&#x270d;&#x1f3fb;', '&#x270c;&#x1f3ff;', '&#x270c;&#x1f3fe;', '&#x270c;&#x1f3fd;', '&#x270c;&#x1f3fc;', '&#x270c;&#x1f3fb;', '&#x270b;&#x1f3ff;', '&#x270b;&#x1f3fe;', '&#x270b;&#x1f3fd;', '&#x270b;&#x1f3fc;', '&#x270b;&#x1f3fb;', '&#x270a;&#x1f3ff;', '&#x270a;&#x1f3fe;', '&#x270a;&#x1f3fd;', '&#x270a;&#x1f3fc;', '&#x270a;&#x1f3fb;', '&#x26f7;&#x1f3fd;', '&#x26f7;&#x1f3fe;', '&#x26f9;&#x1f3ff;', '&#x261d;&#x1f3ff;', '&#x261d;&#x1f3fe;', '&#x26f9;&#x1f3fe;', '&#x261d;&#x1f3fd;', '&#x261d;&#x1f3fc;', '&#x26f9;&#x1f3fd;', '&#x261d;&#x1f3fb;', '&#x26f7;&#x1f3ff;', '&#x26f9;&#x1f3fc;', '&#x26f7;&#x1f3fb;', '&#x26f7;&#x1f3fc;', '&#x34;&#x20e3;', '&#x23;&#x20e3;', '&#x30;&#x20e3;', '&#x31;&#x20e3;', '&#x32;&#x20e3;', '&#x33;&#x20e3;', '&#x2a;&#x20e3;', '&#x35;&#x20e3;', '&#x36;&#x20e3;', '&#x37;&#x20e3;', '&#x38;&#x20e3;', '&#x39;&#x20e3;', '&#x1f1f3;', '&#x1f61b;', '&#x1f61c;', '&#x1f61d;', '&#x1f61e;', '&#x1f61f;', '&#x1f620;', '&#x1f621;', '&#x1f622;', '&#x1f623;', '&#x1f624;', '&#x1f625;', '&#x1f626;', '&#x1f627;', '&#x1f628;', '&#x1f629;', '&#x1f62a;', '&#x1f62b;', '&#x1f62c;', '&#x1f62d;', '&#x1f62e;', '&#x1f62f;', '&#x1f630;', '&#x1f631;', '&#x1f632;', '&#x1f633;', '&#x1f634;', '&#x1f635;', '&#x1f636;', '&#x1f637;', '&#x1f638;', '&#x1f639;', '&#x1f63a;', '&#x1f63b;', '&#x1f63c;', '&#x1f63d;', '&#x1f63e;', '&#x1f63f;', '&#x1f640;', '&#x1f641;', '&#x1f642;', '&#x1f643;', '&#x1f644;', '&#x1f3ef;', '&#x1f3f0;', '&#x1f32d;', '&#x1f32e;', '&#x1f3f3;', '&#x1f32f;', '&#x1f330;', '&#x1f331;', '&#x1f332;', '&#x1f3f4;', '&#x1f3f5;', '&#x1f3f7;', '&#x1f3f8;', '&#x1f3f9;', '&#x1f3fa;', '&#x1f3fb;', '&#x1f3fc;', '&#x1f645;', '&#x1f3fd;', '&#x1f3fe;', '&#x1f3ff;', '&#x1f400;', '&#x1f401;', '&#x1f402;', '&#x1f403;', '&#x1f404;', '&#x1f405;', '&#x1f406;', '&#x1f407;', '&#x1f408;', '&#x1f409;', '&#x1f40a;', '&#x1f40b;', '&#x1f40c;', '&#x1f40d;', '&#x1f646;', '&#x1f40e;', '&#x1f40f;', '&#x1f410;', '&#x1f411;', '&#x1f412;', '&#x1f413;', '&#x1f414;', '&#x1f333;', '&#x1f415;', '&#x1f416;', '&#x1f417;', '&#x1f418;', '&#x1f419;', '&#x1f41a;', '&#x1f41b;', '&#x1f41c;', '&#x1f41d;', '&#x1f647;', '&#x1f648;', '&#x1f649;', '&#x1f64a;', '&#x1f41e;', '&#x1f41f;', '&#x1f420;', '&#x1f421;', '&#x1f422;', '&#x1f423;', '&#x1f424;', '&#x1f425;', '&#x1f426;', '&#x1f427;', '&#x1f428;', '&#x1f429;', '&#x1f42a;', '&#x1f42b;', '&#x1f42c;', '&#x1f42d;', '&#x1f42e;', '&#x1f64b;', '&#x1f42f;', '&#x1f430;', '&#x1f431;', '&#x1f432;', '&#x1f433;', '&#x1f64c;', '&#x1f434;', '&#x1f435;', '&#x1f436;', '&#x1f437;', '&#x1f438;', '&#x1f439;', '&#x1f43a;', '&#x1f43b;', '&#x1f43c;', '&#x1f43d;', '&#x1f43e;', '&#x1f43f;', '&#x1f440;', '&#x1f334;', '&#x1f441;', '&#x1f335;', '&#x1f336;', '&#x1f64d;', '&#x1f337;', '&#x1f338;', '&#x1f339;', '&#x1f442;', '&#x1f33a;', '&#x1f33b;', '&#x1f33c;', '&#x1f33d;', '&#x1f33e;', '&#x1f443;', '&#x1f444;', '&#x1f445;', '&#x1f33f;', '&#x1f340;', '&#x1f341;', '&#x1f342;', '&#x1f343;', '&#x1f64e;', '&#x1f446;', '&#x1f344;', '&#x1f345;', '&#x1f346;', '&#x1f347;', '&#x1f64f;', '&#x1f680;', '&#x1f681;', '&#x1f682;', '&#x1f683;', '&#x1f684;', '&#x1f685;', '&#x1f686;', '&#x1f687;', '&#x1f688;', '&#x1f689;', '&#x1f68a;', '&#x1f68b;', '&#x1f68c;', '&#x1f68d;', '&#x1f68e;', '&#x1f68f;', '&#x1f690;', '&#x1f691;', '&#x1f692;', '&#x1f693;', '&#x1f694;', '&#x1f695;', '&#x1f696;', '&#x1f697;', '&#x1f698;', '&#x1f699;', '&#x1f69a;', '&#x1f69b;', '&#x1f69c;', '&#x1f69d;', '&#x1f69e;', '&#x1f69f;', '&#x1f6a0;', '&#x1f6a1;', '&#x1f6a2;', '&#x1f348;', '&#x1f447;', '&#x1f349;', '&#x1f34a;', '&#x1f34b;', '&#x1f34c;', '&#x1f34d;', '&#x1f448;', '&#x1f34e;', '&#x1f34f;', '&#x1f350;', '&#x1f351;', '&#x1f352;', '&#x1f449;', '&#x1f353;', '&#x1f354;', '&#x1f355;', '&#x1f6a3;', '&#x1f6a4;', '&#x1f6a5;', '&#x1f6a6;', '&#x1f6a7;', '&#x1f6a8;', '&#x1f6a9;', '&#x1f6aa;', '&#x1f6ab;', '&#x1f6ac;', '&#x1f6ad;', '&#x1f6ae;', '&#x1f6af;', '&#x1f6b0;', '&#x1f6b1;', '&#x1f6b2;', '&#x1f6b3;', '&#x1f356;', '&#x1f357;', '&#x1f44a;', '&#x1f358;', '&#x1f359;', '&#x1f35a;', '&#x1f35b;', '&#x1f35c;', '&#x1f44b;', '&#x1f35d;', '&#x1f35e;', '&#x1f35f;', '&#x1f360;', '&#x1f361;', '&#x1f44c;', '&#x1f362;', '&#x1f363;', '&#x1f6b4;', '&#x1f364;', '&#x1f365;', '&#x1f366;', '&#x1f44d;', '&#x1f367;', '&#x1f469;', '&#x1f46a;', '&#x1f368;', '&#x1f369;', '&#x1f36a;', '&#x1f36b;', '&#x1f44e;', '&#x1f46b;', '&#x1f36c;', '&#x1f36d;', '&#x1f36e;', '&#x1f36f;', '&#x1f6b5;', '&#x1f370;', '&#x1f46c;', '&#x1f44f;', '&#x1f371;', '&#x1f372;', '&#x1f373;', '&#x1f374;', '&#x1f46d;', '&#x1f375;', '&#x1f450;', '&#x1f451;', '&#x1f452;', '&#x1f453;', '&#x1f454;', '&#x1f455;', '&#x1f456;', '&#x1f457;', '&#x1f6b6;', '&#x1f6b7;', '&#x1f6b8;', '&#x1f6b9;', '&#x1f6ba;', '&#x1f6bb;', '&#x1f6bc;', '&#x1f6bd;', '&#x1f6be;', '&#x1f6bf;', '&#x1f458;', '&#x1f459;', '&#x1f45a;', '&#x1f45b;', '&#x1f45c;', '&#x1f6c0;', '&#x1f6c1;', '&#x1f6c2;', '&#x1f6c3;', '&#x1f6c4;', '&#x1f6c5;', '&#x1f6cb;', '&#x1f45d;', '&#x1f45e;', '&#x1f45f;', '&#x1f46e;', '&#x1f460;', '&#x1f6cc;', '&#x1f6cd;', '&#x1f6ce;', '&#x1f6cf;', '&#x1f6d0;', '&#x1f6d1;', '&#x1f6d2;', '&#x1f6d5;', '&#x1f6e0;', '&#x1f6e1;', '&#x1f6e2;', '&#x1f6e3;', '&#x1f6e4;', '&#x1f6e5;', '&#x1f6e9;', '&#x1f6eb;', '&#x1f6ec;', '&#x1f6f0;', '&#x1f6f3;', '&#x1f6f4;', '&#x1f6f5;', '&#x1f6f6;', '&#x1f6f7;', '&#x1f6f8;', '&#x1f6f9;', '&#x1f6fa;', '&#x1f7e0;', '&#x1f7e1;', '&#x1f7e2;', '&#x1f7e3;', '&#x1f7e4;', '&#x1f7e5;', '&#x1f7e6;', '&#x1f7e7;', '&#x1f7e8;', '&#x1f7e9;', '&#x1f7ea;', '&#x1f7eb;', '&#x1f90d;', '&#x1f90e;', '&#x1f461;', '&#x1f46f;', '&#x1f462;', '&#x1f463;', '&#x1f464;', '&#x1f90f;', '&#x1f910;', '&#x1f911;', '&#x1f912;', '&#x1f913;', '&#x1f914;', '&#x1f915;', '&#x1f916;', '&#x1f917;', '&#x1f465;', '&#x1f376;', '&#x1f470;', '&#x1f377;', '&#x1f378;', '&#x1f918;', '&#x1f379;', '&#x1f37a;', '&#x1f466;', '&#x1f37b;', '&#x1f37c;', '&#x1f919;', '&#x1f37d;', '&#x1f37e;', '&#x1f37f;', '&#x1f467;', '&#x1f380;', '&#x1f91a;', '&#x1f381;', '&#x1f382;', '&#x1f383;', '&#x1f384;', '&#x1f1f5;', '&#x1f91b;', '&#x1f471;', '&#x1f17e;', '&#x1f1f6;', '&#x1f1f2;', '&#x1f17f;', '&#x1f91c;', '&#x1f91d;', '&#x1f385;', '&#x1f472;', '&#x1f386;', '&#x1f387;', '&#x1f388;', '&#x1f91e;', '&#x1f389;', '&#x1f38a;', '&#x1f38b;', '&#x1f38c;', '&#x1f38d;', '&#x1f91f;', '&#x1f920;', '&#x1f921;', '&#x1f922;', '&#x1f923;', '&#x1f924;', '&#x1f925;', '&#x1f38e;', '&#x1f38f;', '&#x1f390;', '&#x1f391;', '&#x1f392;', '&#x1f393;', '&#x1f396;', '&#x1f397;', '&#x1f399;', '&#x1f473;', '&#x1f39a;', '&#x1f39b;', '&#x1f39e;', '&#x1f39f;', '&#x1f3a0;', '&#x1f474;', '&#x1f3a1;', '&#x1f926;', '&#x1f927;', '&#x1f928;', '&#x1f929;', '&#x1f92a;', '&#x1f92b;', '&#x1f92c;', '&#x1f92d;', '&#x1f92e;', '&#x1f92f;', '&#x1f3a2;', '&#x1f3a3;', '&#x1f3a4;', '&#x1f3a5;', '&#x1f475;', '&#x1f930;', '&#x1f3a6;', '&#x1f3a7;', '&#x1f3a8;', '&#x1f3a9;', '&#x1f3aa;', '&#x1f931;', '&#x1f476;', '&#x1f3ab;', '&#x1f3ac;', '&#x1f3ad;', '&#x1f3ae;', '&#x1f932;', '&#x1f3af;', '&#x1f3b0;', '&#x1f3b1;', '&#x1f3b2;', '&#x1f3b3;', '&#x1f933;', '&#x1f3b4;', '&#x1f3b5;', '&#x1f3b6;', '&#x1f3b7;', '&#x1f3b8;', '&#x1f934;', '&#x1f3b9;', '&#x1f3ba;', '&#x1f3bb;', '&#x1f477;', '&#x1f3bc;', '&#x1f3bd;', '&#x1f3be;', '&#x1f3bf;', '&#x1f3c0;', '&#x1f478;', '&#x1f479;', '&#x1f47a;', '&#x1f47b;', '&#x1f3c1;', '&#x1f1e7;', '&#x1f1ee;', '&#x1f1ea;', '&#x1f935;', '&#x1f1f7;', '&#x1f47c;', '&#x1f47d;', '&#x1f47e;', '&#x1f47f;', '&#x1f936;', '&#x1f480;', '&#x1f1f1;', '&#x1f3c2;', '&#x1f18e;', '&#x1f191;', '&#x1f1e8;', '&#x1f1f9;', '&#x1f1ef;', '&#x1f192;', '&#x1f1ec;', '&#x1f193;', '&#x1f0cf;', '&#x1f194;', '&#x1f1f4;', '&#x1f1fa;', '&#x1f1eb;', '&#x1f195;', '&#x1f937;', '&#x1f196;', '&#x1f481;', '&#x1f197;', '&#x1f1ed;', '&#x1f3c3;', '&#x1f198;', '&#x1f1e9;', '&#x1f1fb;', '&#x1f1f0;', '&#x1f199;', '&#x1f1fc;', '&#x1f19a;', '&#x1f1fd;', '&#x1f1f8;', '&#x1f004;', '&#x1f1fe;', '&#x1f1e6;', '&#x1f938;', '&#x1f170;', '&#x1f171;', '&#x1f482;', '&#x1f1ff;', '&#x1f201;', '&#x1f202;', '&#x1f3c4;', '&#x1f3c5;', '&#x1f483;', '&#x1f484;', '&#x1f3c6;', '&#x1f21a;', '&#x1f22f;', '&#x1f232;', '&#x1f233;', '&#x1f485;', '&#x1f234;', '&#x1f939;', '&#x1f93a;', '&#x1f3c7;', '&#x1f3c8;', '&#x1f93c;', '&#x1f3c9;', '&#x1f235;', '&#x1f236;', '&#x1f237;', '&#x1f238;', '&#x1f239;', '&#x1f23a;', '&#x1f250;', '&#x1f251;', '&#x1f300;', '&#x1f301;', '&#x1f302;', '&#x1f303;', '&#x1f304;', '&#x1f486;', '&#x1f305;', '&#x1f306;', '&#x1f93d;', '&#x1f307;', '&#x1f308;', '&#x1f3ca;', '&#x1f309;', '&#x1f30a;', '&#x1f30b;', '&#x1f30c;', '&#x1f30d;', '&#x1f30e;', '&#x1f30f;', '&#x1f310;', '&#x1f311;', '&#x1f312;', '&#x1f313;', '&#x1f314;', '&#x1f487;', '&#x1f488;', '&#x1f93e;', '&#x1f93f;', '&#x1f940;', '&#x1f941;', '&#x1f942;', '&#x1f943;', '&#x1f944;', '&#x1f945;', '&#x1f947;', '&#x1f948;', '&#x1f949;', '&#x1f94a;', '&#x1f94b;', '&#x1f94c;', '&#x1f94d;', '&#x1f94e;', '&#x1f94f;', '&#x1f950;', '&#x1f951;', '&#x1f952;', '&#x1f953;', '&#x1f954;', '&#x1f955;', '&#x1f956;', '&#x1f957;', '&#x1f958;', '&#x1f959;', '&#x1f95a;', '&#x1f95b;', '&#x1f95c;', '&#x1f95d;', '&#x1f95e;', '&#x1f95f;', '&#x1f960;', '&#x1f961;', '&#x1f962;', '&#x1f963;', '&#x1f964;', '&#x1f965;', '&#x1f966;', '&#x1f967;', '&#x1f968;', '&#x1f969;', '&#x1f96a;', '&#x1f96b;', '&#x1f96c;', '&#x1f96d;', '&#x1f96e;', '&#x1f96f;', '&#x1f970;', '&#x1f971;', '&#x1f973;', '&#x1f974;', '&#x1f975;', '&#x1f976;', '&#x1f97a;', '&#x1f97b;', '&#x1f97c;', '&#x1f97d;', '&#x1f97e;', '&#x1f97f;', '&#x1f980;', '&#x1f981;', '&#x1f982;', '&#x1f983;', '&#x1f984;', '&#x1f985;', '&#x1f986;', '&#x1f987;', '&#x1f988;', '&#x1f989;', '&#x1f98a;', '&#x1f98b;', '&#x1f98c;', '&#x1f98d;', '&#x1f98e;', '&#x1f98f;', '&#x1f990;', '&#x1f991;', '&#x1f992;', '&#x1f993;', '&#x1f994;', '&#x1f995;', '&#x1f996;', '&#x1f997;', '&#x1f998;', '&#x1f999;', '&#x1f99a;', '&#x1f99b;', '&#x1f99c;', '&#x1f99d;', '&#x1f99e;', '&#x1f99f;', '&#x1f9a0;', '&#x1f9a1;', '&#x1f9a2;', '&#x1f9a5;', '&#x1f9a6;', '&#x1f9a7;', '&#x1f9a8;', '&#x1f9a9;', '&#x1f9aa;', '&#x1f9ae;', '&#x1f9af;', '&#x1f9b0;', '&#x1f9b1;', '&#x1f9b2;', '&#x1f9b3;', '&#x1f9b4;', '&#x1f489;', '&#x1f48a;', '&#x1f48b;', '&#x1f48c;', '&#x1f48d;', '&#x1f9b5;', '&#x1f48e;', '&#x1f48f;', '&#x1f490;', '&#x1f491;', '&#x1f492;', '&#x1f9b6;', '&#x1f9b7;', '&#x1f493;', '&#x1f494;', '&#x1f495;', '&#x1f496;', '&#x1f497;', '&#x1f498;', '&#x1f499;', '&#x1f49a;', '&#x1f49b;', '&#x1f49c;', '&#x1f49d;', '&#x1f49e;', '&#x1f49f;', '&#x1f4a0;', '&#x1f4a1;', '&#x1f4a2;', '&#x1f4a3;', '&#x1f9b8;', '&#x1f4a4;', '&#x1f4a5;', '&#x1f4a6;', '&#x1f4a7;', '&#x1f4a8;', '&#x1f4a9;', '&#x1f315;', '&#x1f316;', '&#x1f317;', '&#x1f318;', '&#x1f319;', '&#x1f4aa;', '&#x1f4ab;', '&#x1f4ac;', '&#x1f4ad;', '&#x1f4ae;', '&#x1f4af;', '&#x1f9b9;', '&#x1f9ba;', '&#x1f4b0;', '&#x1f4b1;', '&#x1f4b2;', '&#x1f4b3;', '&#x1f4b4;', '&#x1f9bb;', '&#x1f9bc;', '&#x1f9bd;', '&#x1f9be;', '&#x1f9bf;', '&#x1f9c0;', '&#x1f9c1;', '&#x1f9c2;', '&#x1f9c3;', '&#x1f9c4;', '&#x1f9c5;', '&#x1f9c6;', '&#x1f9c7;', '&#x1f9c8;', '&#x1f9c9;', '&#x1f9ca;', '&#x1f4b5;', '&#x1f4b6;', '&#x1f4b7;', '&#x1f4b8;', '&#x1f4b9;', '&#x1f4ba;', '&#x1f4bb;', '&#x1f4bc;', '&#x1f4bd;', '&#x1f4be;', '&#x1f4bf;', '&#x1f4c0;', '&#x1f4c1;', '&#x1f4c2;', '&#x1f4c3;', '&#x1f4c4;', '&#x1f4c5;', '&#x1f9cd;', '&#x1f4c6;', '&#x1f4c7;', '&#x1f4c8;', '&#x1f4c9;', '&#x1f4ca;', '&#x1f4cb;', '&#x1f4cc;', '&#x1f4cd;', '&#x1f4ce;', '&#x1f4cf;', '&#x1f4d0;', '&#x1f4d1;', '&#x1f4d2;', '&#x1f4d3;', '&#x1f4d4;', '&#x1f4d5;', '&#x1f4d6;', '&#x1f9ce;', '&#x1f4d7;', '&#x1f4d8;', '&#x1f4d9;', '&#x1f4da;', '&#x1f4db;', '&#x1f4dc;', '&#x1f4dd;', '&#x1f4de;', '&#x1f4df;', '&#x1f4e0;', '&#x1f4e1;', '&#x1f4e2;', '&#x1f4e3;', '&#x1f4e4;', '&#x1f4e5;', '&#x1f4e6;', '&#x1f4e7;', '&#x1f9cf;', '&#x1f9d0;', '&#x1f4e8;', '&#x1f4e9;', '&#x1f4ea;', '&#x1f4eb;', '&#x1f4ec;', '&#x1f4ed;', '&#x1f4ee;', '&#x1f4ef;', '&#x1f4f0;', '&#x1f4f1;', '&#x1f4f2;', '&#x1f4f3;', '&#x1f4f4;', '&#x1f4f5;', '&#x1f4f6;', '&#x1f4f7;', '&#x1f4f8;', '&#x1f4f9;', '&#x1f4fa;', '&#x1f4fb;', '&#x1f4fc;', '&#x1f9d1;', '&#x1f4fd;', '&#x1f4ff;', '&#x1f500;', '&#x1f501;', '&#x1f502;', '&#x1f9d2;', '&#x1f503;', '&#x1f504;', '&#x1f505;', '&#x1f506;', '&#x1f507;', '&#x1f9d3;', '&#x1f508;', '&#x1f509;', '&#x1f50a;', '&#x1f50b;', '&#x1f50c;', '&#x1f9d4;', '&#x1f50d;', '&#x1f50e;', '&#x1f50f;', '&#x1f510;', '&#x1f511;', '&#x1f9d5;', '&#x1f512;', '&#x1f513;', '&#x1f514;', '&#x1f515;', '&#x1f516;', '&#x1f517;', '&#x1f518;', '&#x1f519;', '&#x1f51a;', '&#x1f51b;', '&#x1f51c;', '&#x1f51d;', '&#x1f51e;', '&#x1f51f;', '&#x1f520;', '&#x1f521;', '&#x1f522;', '&#x1f9d6;', '&#x1f523;', '&#x1f524;', '&#x1f525;', '&#x1f526;', '&#x1f527;', '&#x1f528;', '&#x1f529;', '&#x1f52a;', '&#x1f52b;', '&#x1f52c;', '&#x1f52d;', '&#x1f52e;', '&#x1f52f;', '&#x1f530;', '&#x1f531;', '&#x1f532;', '&#x1f533;', '&#x1f9d7;', '&#x1f534;', '&#x1f535;', '&#x1f536;', '&#x1f537;', '&#x1f538;', '&#x1f539;', '&#x1f53a;', '&#x1f53b;', '&#x1f53c;', '&#x1f53d;', '&#x1f549;', '&#x1f54a;', '&#x1f54b;', '&#x1f54c;', '&#x1f54d;', '&#x1f54e;', '&#x1f550;', '&#x1f9d8;', '&#x1f551;', '&#x1f552;', '&#x1f553;', '&#x1f554;', '&#x1f555;', '&#x1f556;', '&#x1f557;', '&#x1f558;', '&#x1f559;', '&#x1f55a;', '&#x1f55b;', '&#x1f55c;', '&#x1f55d;', '&#x1f55e;', '&#x1f55f;', '&#x1f560;', '&#x1f561;', '&#x1f9d9;', '&#x1f562;', '&#x1f563;', '&#x1f564;', '&#x1f565;', '&#x1f566;', '&#x1f567;', '&#x1f56f;', '&#x1f570;', '&#x1f573;', '&#x1f3cb;', '&#x1f31a;', '&#x1f31b;', '&#x1f31c;', '&#x1f31d;', '&#x1f31e;', '&#x1f31f;', '&#x1f320;', '&#x1f9da;', '&#x1f321;', '&#x1f324;', '&#x1f325;', '&#x1f326;', '&#x1f327;', '&#x1f328;', '&#x1f329;', '&#x1f32a;', '&#x1f32b;', '&#x1f574;', '&#x1f468;', '&#x1f32c;', '&#x1f3cc;', '&#x1f3cd;', '&#x1f3ce;', '&#x1f3cf;', '&#x1f3d0;', '&#x1f9db;', '&#x1f3d1;', '&#x1f3d2;', '&#x1f3d3;', '&#x1f3d4;', '&#x1f3d5;', '&#x1f3d6;', '&#x1f3d7;', '&#x1f3d8;', '&#x1f3d9;', '&#x1f3da;', '&#x1f575;', '&#x1f576;', '&#x1f577;', '&#x1f578;', '&#x1f579;', '&#x1f3db;', '&#x1f3dc;', '&#x1f9dc;', '&#x1f3dd;', '&#x1f3de;', '&#x1f3df;', '&#x1f57a;', '&#x1f587;', '&#x1f58a;', '&#x1f58b;', '&#x1f58c;', '&#x1f58d;', '&#x1f3e0;', '&#x1f3e1;', '&#x1f3e2;', '&#x1f3e3;', '&#x1f3e4;', '&#x1f590;', '&#x1f3e5;', '&#x1f3e6;', '&#x1f9dd;', '&#x1f3e7;', '&#x1f3e8;', '&#x1f9de;', '&#x1f3e9;', '&#x1f595;', '&#x1f9df;', '&#x1f9e0;', '&#x1f9e1;', '&#x1f9e2;', '&#x1f9e3;', '&#x1f9e4;', '&#x1f9e5;', '&#x1f9e6;', '&#x1f9e7;', '&#x1f9e8;', '&#x1f9e9;', '&#x1f9ea;', '&#x1f9eb;', '&#x1f9ec;', '&#x1f9ed;', '&#x1f9ee;', '&#x1f9ef;', '&#x1f9f0;', '&#x1f9f1;', '&#x1f9f2;', '&#x1f9f3;', '&#x1f9f4;', '&#x1f9f5;', '&#x1f9f6;', '&#x1f9f7;', '&#x1f9f8;', '&#x1f9f9;', '&#x1f9fa;', '&#x1f9fb;', '&#x1f9fc;', '&#x1f9fd;', '&#x1f9fe;', '&#x1f9ff;', '&#x1fa70;', '&#x1fa71;', '&#x1fa72;', '&#x1fa73;', '&#x1fa78;', '&#x1fa79;', '&#x1fa7a;', '&#x1fa80;', '&#x1fa81;', '&#x1fa82;', '&#x1fa90;', '&#x1fa91;', '&#x1fa92;', '&#x1fa93;', '&#x1fa94;', '&#x1fa95;', '&#x1f3ea;', '&#x1f3eb;', '&#x1f3ec;', '&#x1f3ed;', '&#x1f3ee;', '&#x1f596;', '&#x1f5a4;', '&#x1f5a5;', '&#x1f5a8;', '&#x1f5b1;', '&#x1f5b2;', '&#x1f5bc;', '&#x1f5c2;', '&#x1f5c3;', '&#x1f5c4;', '&#x1f5d1;', '&#x1f5d2;', '&#x1f5d3;', '&#x1f5dc;', '&#x1f5dd;', '&#x1f5de;', '&#x1f5e1;', '&#x1f5e3;', '&#x1f5e8;', '&#x1f5ef;', '&#x1f5f3;', '&#x1f5fa;', '&#x1f5fb;', '&#x1f5fc;', '&#x1f5fd;', '&#x1f5fe;', '&#x1f5ff;', '&#x1f600;', '&#x1f601;', '&#x1f602;', '&#x1f603;', '&#x1f604;', '&#x1f605;', '&#x1f606;', '&#x1f607;', '&#x1f608;', '&#x1f609;', '&#x1f60a;', '&#x1f60b;', '&#x1f60c;', '&#x1f60d;', '&#x1f60e;', '&#x1f60f;', '&#x1f610;', '&#x1f611;', '&#x1f612;', '&#x1f613;', '&#x1f614;', '&#x1f615;', '&#x1f616;', '&#x1f617;', '&#x1f618;', '&#x1f619;', '&#x1f61a;', '&#x25ab;', '&#x2626;', '&#x262e;', '&#x262f;', '&#x2638;', '&#x2639;', '&#x263a;', '&#x2640;', '&#x2642;', '&#x2648;', '&#x2649;', '&#x264a;', '&#x264b;', '&#x264c;', '&#x264d;', '&#x264e;', '&#x264f;', '&#x2650;', '&#x2651;', '&#x2652;', '&#x2653;', '&#x265f;', '&#x2660;', '&#x2663;', '&#x2665;', '&#x2666;', '&#x2668;', '&#x267b;', '&#x267e;', '&#x267f;', '&#x2692;', '&#x2693;', '&#x2694;', '&#x2695;', '&#x2696;', '&#x2697;', '&#x2699;', '&#x269b;', '&#x269c;', '&#x26a0;', '&#x26a1;', '&#x26a7;', '&#x26aa;', '&#x26ab;', '&#x26b0;', '&#x26b1;', '&#x26bd;', '&#x26be;', '&#x26c4;', '&#x26c5;', '&#x26c8;', '&#x26ce;', '&#x26cf;', '&#x26d1;', '&#x26d3;', '&#x26d4;', '&#x26e9;', '&#x26ea;', '&#x26f0;', '&#x26f1;', '&#x26f2;', '&#x26f3;', '&#x26f4;', '&#x26f5;', '&#x2623;', '&#x2622;', '&#x2620;', '&#x261d;', '&#x2618;', '&#x26f7;', '&#x26f8;', '&#x2615;', '&#x2614;', '&#x2611;', '&#x260e;', '&#x2604;', '&#x2603;', '&#x2602;', '&#x2601;', '&#x2600;', '&#x25fe;', '&#x25fd;', '&#x25fc;', '&#x25fb;', '&#x25c0;', '&#x25b6;', '&#x262a;', '&#x25aa;', '&#x26f9;', '&#x26fa;', '&#x26fd;', '&#x2702;', '&#x2705;', '&#x2708;', '&#x2709;', '&#x24c2;', '&#x23fa;', '&#x23f9;', '&#x23f8;', '&#x23f3;', '&#x270a;', '&#x23f2;', '&#x23f1;', '&#x23f0;', '&#x23ef;', '&#x23ee;', '&#x270b;', '&#x23ed;', '&#x23ec;', '&#x23eb;', '&#x23ea;', '&#x23e9;', '&#x270c;', '&#x23cf;', '&#x2328;', '&#x231b;', '&#x231a;', '&#x21aa;', '&#x270d;', '&#x270f;', '&#x2712;', '&#x2714;', '&#x2716;', '&#x271d;', '&#x2721;', '&#x2728;', '&#x2733;', '&#x2734;', '&#x2744;', '&#x2747;', '&#x274c;', '&#x274e;', '&#x2753;', '&#x2754;', '&#x2755;', '&#x2757;', '&#x2763;', '&#x2764;', '&#x2795;', '&#x2796;', '&#x2797;', '&#x27a1;', '&#x27b0;', '&#x27bf;', '&#x2934;', '&#x2935;', '&#x21a9;', '&#x2b05;', '&#x2b06;', '&#x2b07;', '&#x2b1b;', '&#x2b1c;', '&#x2b50;', '&#x2b55;', '&#x2199;', '&#x3030;', '&#x303d;', '&#x2198;', '&#x2197;', '&#x3297;', '&#x3299;', '&#x2196;', '&#x2195;', '&#x2194;', '&#x2139;', '&#x2122;', '&#x2049;', '&#x203c;', '&#xe50a;' );
  5345. $partials = array( '&#x1f004;', '&#x1f0cf;', '&#x1f170;', '&#x1f171;', '&#x1f17e;', '&#x1f17f;', '&#x1f18e;', '&#x1f191;', '&#x1f192;', '&#x1f193;', '&#x1f194;', '&#x1f195;', '&#x1f196;', '&#x1f197;', '&#x1f198;', '&#x1f199;', '&#x1f19a;', '&#x1f1e6;', '&#x1f1e8;', '&#x1f1e9;', '&#x1f1ea;', '&#x1f1eb;', '&#x1f1ec;', '&#x1f1ee;', '&#x1f1f1;', '&#x1f1f2;', '&#x1f1f4;', '&#x1f1f6;', '&#x1f1f7;', '&#x1f1f8;', '&#x1f1f9;', '&#x1f1fa;', '&#x1f1fc;', '&#x1f1fd;', '&#x1f1ff;', '&#x1f1e7;', '&#x1f1ed;', '&#x1f1ef;', '&#x1f1f3;', '&#x1f1fb;', '&#x1f1fe;', '&#x1f1f0;', '&#x1f1f5;', '&#x1f201;', '&#x1f202;', '&#x1f21a;', '&#x1f22f;', '&#x1f232;', '&#x1f233;', '&#x1f234;', '&#x1f235;', '&#x1f236;', '&#x1f237;', '&#x1f238;', '&#x1f239;', '&#x1f23a;', '&#x1f250;', '&#x1f251;', '&#x1f300;', '&#x1f301;', '&#x1f302;', '&#x1f303;', '&#x1f304;', '&#x1f305;', '&#x1f306;', '&#x1f307;', '&#x1f308;', '&#x1f309;', '&#x1f30a;', '&#x1f30b;', '&#x1f30c;', '&#x1f30d;', '&#x1f30e;', '&#x1f30f;', '&#x1f310;', '&#x1f311;', '&#x1f312;', '&#x1f313;', '&#x1f314;', '&#x1f315;', '&#x1f316;', '&#x1f317;', '&#x1f318;', '&#x1f319;', '&#x1f31a;', '&#x1f31b;', '&#x1f31c;', '&#x1f31d;', '&#x1f31e;', '&#x1f31f;', '&#x1f320;', '&#x1f321;', '&#x1f324;', '&#x1f325;', '&#x1f326;', '&#x1f327;', '&#x1f328;', '&#x1f329;', '&#x1f32a;', '&#x1f32b;', '&#x1f32c;', '&#x1f32d;', '&#x1f32e;', '&#x1f32f;', '&#x1f330;', '&#x1f331;', '&#x1f332;', '&#x1f333;', '&#x1f334;', '&#x1f335;', '&#x1f336;', '&#x1f337;', '&#x1f338;', '&#x1f339;', '&#x1f33a;', '&#x1f33b;', '&#x1f33c;', '&#x1f33d;', '&#x1f33e;', '&#x1f33f;', '&#x1f340;', '&#x1f341;', '&#x1f342;', '&#x1f343;', '&#x1f344;', '&#x1f345;', '&#x1f346;', '&#x1f347;', '&#x1f348;', '&#x1f349;', '&#x1f34a;', '&#x1f34b;', '&#x1f34c;', '&#x1f34d;', '&#x1f34e;', '&#x1f34f;', '&#x1f350;', '&#x1f351;', '&#x1f352;', '&#x1f353;', '&#x1f354;', '&#x1f355;', '&#x1f356;', '&#x1f357;', '&#x1f358;', '&#x1f359;', '&#x1f35a;', '&#x1f35b;', '&#x1f35c;', '&#x1f35d;', '&#x1f35e;', '&#x1f35f;', '&#x1f360;', '&#x1f361;', '&#x1f362;', '&#x1f363;', '&#x1f364;', '&#x1f365;', '&#x1f366;', '&#x1f367;', '&#x1f368;', '&#x1f369;', '&#x1f36a;', '&#x1f36b;', '&#x1f36c;', '&#x1f36d;', '&#x1f36e;', '&#x1f36f;', '&#x1f370;', '&#x1f371;', '&#x1f372;', '&#x1f373;', '&#x1f374;', '&#x1f375;', '&#x1f376;', '&#x1f377;', '&#x1f378;', '&#x1f379;', '&#x1f37a;', '&#x1f37b;', '&#x1f37c;', '&#x1f37d;', '&#x1f37e;', '&#x1f37f;', '&#x1f380;', '&#x1f381;', '&#x1f382;', '&#x1f383;', '&#x1f384;', '&#x1f385;', '&#x1f3fb;', '&#x1f3fc;', '&#x1f3fd;', '&#x1f3fe;', '&#x1f3ff;', '&#x1f386;', '&#x1f387;', '&#x1f388;', '&#x1f389;', '&#x1f38a;', '&#x1f38b;', '&#x1f38c;', '&#x1f38d;', '&#x1f38e;', '&#x1f38f;', '&#x1f390;', '&#x1f391;', '&#x1f392;', '&#x1f393;', '&#x1f396;', '&#x1f397;', '&#x1f399;', '&#x1f39a;', '&#x1f39b;', '&#x1f39e;', '&#x1f39f;', '&#x1f3a0;', '&#x1f3a1;', '&#x1f3a2;', '&#x1f3a3;', '&#x1f3a4;', '&#x1f3a5;', '&#x1f3a6;', '&#x1f3a7;', '&#x1f3a8;', '&#x1f3a9;', '&#x1f3aa;', '&#x1f3ab;', '&#x1f3ac;', '&#x1f3ad;', '&#x1f3ae;', '&#x1f3af;', '&#x1f3b0;', '&#x1f3b1;', '&#x1f3b2;', '&#x1f3b3;', '&#x1f3b4;', '&#x1f3b5;', '&#x1f3b6;', '&#x1f3b7;', '&#x1f3b8;', '&#x1f3b9;', '&#x1f3ba;', '&#x1f3bb;', '&#x1f3bc;', '&#x1f3bd;', '&#x1f3be;', '&#x1f3bf;', '&#x1f3c0;', '&#x1f3c1;', '&#x1f3c2;', '&#x1f3c3;', '&#x200d;', '&#x2640;', '&#xfe0f;', '&#x2642;', '&#x1f3c4;', '&#x1f3c5;', '&#x1f3c6;', '&#x1f3c7;', '&#x1f3c8;', '&#x1f3c9;', '&#x1f3ca;', '&#x1f3cb;', '&#x1f3cc;', '&#x1f3cd;', '&#x1f3ce;', '&#x1f3cf;', '&#x1f3d0;', '&#x1f3d1;', '&#x1f3d2;', '&#x1f3d3;', '&#x1f3d4;', '&#x1f3d5;', '&#x1f3d6;', '&#x1f3d7;', '&#x1f3d8;', '&#x1f3d9;', '&#x1f3da;', '&#x1f3db;', '&#x1f3dc;', '&#x1f3dd;', '&#x1f3de;', '&#x1f3df;', '&#x1f3e0;', '&#x1f3e1;', '&#x1f3e2;', '&#x1f3e3;', '&#x1f3e4;', '&#x1f3e5;', '&#x1f3e6;', '&#x1f3e7;', '&#x1f3e8;', '&#x1f3e9;', '&#x1f3ea;', '&#x1f3eb;', '&#x1f3ec;', '&#x1f3ed;', '&#x1f3ee;', '&#x1f3ef;', '&#x1f3f0;', '&#x1f3f3;', '&#x26a7;', '&#x1f3f4;', '&#x2620;', '&#xe0067;', '&#xe0062;', '&#xe0065;', '&#xe006e;', '&#xe007f;', '&#xe0073;', '&#xe0063;', '&#xe0074;', '&#xe0077;', '&#xe006c;', '&#x1f3f5;', '&#x1f3f7;', '&#x1f3f8;', '&#x1f3f9;', '&#x1f3fa;', '&#x1f400;', '&#x1f401;', '&#x1f402;', '&#x1f403;', '&#x1f404;', '&#x1f405;', '&#x1f406;', '&#x1f407;', '&#x1f408;', '&#x1f409;', '&#x1f40a;', '&#x1f40b;', '&#x1f40c;', '&#x1f40d;', '&#x1f40e;', '&#x1f40f;', '&#x1f410;', '&#x1f411;', '&#x1f412;', '&#x1f413;', '&#x1f414;', '&#x1f415;', '&#x1f9ba;', '&#x1f416;', '&#x1f417;', '&#x1f418;', '&#x1f419;', '&#x1f41a;', '&#x1f41b;', '&#x1f41c;', '&#x1f41d;', '&#x1f41e;', '&#x1f41f;', '&#x1f420;', '&#x1f421;', '&#x1f422;', '&#x1f423;', '&#x1f424;', '&#x1f425;', '&#x1f426;', '&#x1f427;', '&#x1f428;', '&#x1f429;', '&#x1f42a;', '&#x1f42b;', '&#x1f42c;', '&#x1f42d;', '&#x1f42e;', '&#x1f42f;', '&#x1f430;', '&#x1f431;', '&#x1f432;', '&#x1f433;', '&#x1f434;', '&#x1f435;', '&#x1f436;', '&#x1f437;', '&#x1f438;', '&#x1f439;', '&#x1f43a;', '&#x1f43b;', '&#x1f43c;', '&#x1f43d;', '&#x1f43e;', '&#x1f43f;', '&#x1f440;', '&#x1f441;', '&#x1f5e8;', '&#x1f442;', '&#x1f443;', '&#x1f444;', '&#x1f445;', '&#x1f446;', '&#x1f447;', '&#x1f448;', '&#x1f449;', '&#x1f44a;', '&#x1f44b;', '&#x1f44c;', '&#x1f44d;', '&#x1f44e;', '&#x1f44f;', '&#x1f450;', '&#x1f451;', '&#x1f452;', '&#x1f453;', '&#x1f454;', '&#x1f455;', '&#x1f456;', '&#x1f457;', '&#x1f458;', '&#x1f459;', '&#x1f45a;', '&#x1f45b;', '&#x1f45c;', '&#x1f45d;', '&#x1f45e;', '&#x1f45f;', '&#x1f460;', '&#x1f461;', '&#x1f462;', '&#x1f463;', '&#x1f464;', '&#x1f465;', '&#x1f466;', '&#x1f467;', '&#x1f468;', '&#x1f4bb;', '&#x1f4bc;', '&#x1f527;', '&#x1f52c;', '&#x1f680;', '&#x1f692;', '&#x1f9af;', '&#x1f9b0;', '&#x1f9b1;', '&#x1f9b2;', '&#x1f9b3;', '&#x1f9bc;', '&#x1f9bd;', '&#x2695;', '&#x2696;', '&#x2708;', '&#x1f91d;', '&#x1f469;', '&#x2764;', '&#x1f48b;', '&#x1f46a;', '&#x1f46b;', '&#x1f46c;', '&#x1f46d;', '&#x1f46e;', '&#x1f46f;', '&#x1f470;', '&#x1f471;', '&#x1f472;', '&#x1f473;', '&#x1f474;', '&#x1f475;', '&#x1f476;', '&#x1f477;', '&#x1f478;', '&#x1f479;', '&#x1f47a;', '&#x1f47b;', '&#x1f47c;', '&#x1f47d;', '&#x1f47e;', '&#x1f47f;', '&#x1f480;', '&#x1f481;', '&#x1f482;', '&#x1f483;', '&#x1f484;', '&#x1f485;', '&#x1f486;', '&#x1f487;', '&#x1f488;', '&#x1f489;', '&#x1f48a;', '&#x1f48c;', '&#x1f48d;', '&#x1f48e;', '&#x1f48f;', '&#x1f490;', '&#x1f491;', '&#x1f492;', '&#x1f493;', '&#x1f494;', '&#x1f495;', '&#x1f496;', '&#x1f497;', '&#x1f498;', '&#x1f499;', '&#x1f49a;', '&#x1f49b;', '&#x1f49c;', '&#x1f49d;', '&#x1f49e;', '&#x1f49f;', '&#x1f4a0;', '&#x1f4a1;', '&#x1f4a2;', '&#x1f4a3;', '&#x1f4a4;', '&#x1f4a5;', '&#x1f4a6;', '&#x1f4a7;', '&#x1f4a8;', '&#x1f4a9;', '&#x1f4aa;', '&#x1f4ab;', '&#x1f4ac;', '&#x1f4ad;', '&#x1f4ae;', '&#x1f4af;', '&#x1f4b0;', '&#x1f4b1;', '&#x1f4b2;', '&#x1f4b3;', '&#x1f4b4;', '&#x1f4b5;', '&#x1f4b6;', '&#x1f4b7;', '&#x1f4b8;', '&#x1f4b9;', '&#x1f4ba;', '&#x1f4bd;', '&#x1f4be;', '&#x1f4bf;', '&#x1f4c0;', '&#x1f4c1;', '&#x1f4c2;', '&#x1f4c3;', '&#x1f4c4;', '&#x1f4c5;', '&#x1f4c6;', '&#x1f4c7;', '&#x1f4c8;', '&#x1f4c9;', '&#x1f4ca;', '&#x1f4cb;', '&#x1f4cc;', '&#x1f4cd;', '&#x1f4ce;', '&#x1f4cf;', '&#x1f4d0;', '&#x1f4d1;', '&#x1f4d2;', '&#x1f4d3;', '&#x1f4d4;', '&#x1f4d5;', '&#x1f4d6;', '&#x1f4d7;', '&#x1f4d8;', '&#x1f4d9;', '&#x1f4da;', '&#x1f4db;', '&#x1f4dc;', '&#x1f4dd;', '&#x1f4de;', '&#x1f4df;', '&#x1f4e0;', '&#x1f4e1;', '&#x1f4e2;', '&#x1f4e3;', '&#x1f4e4;', '&#x1f4e5;', '&#x1f4e6;', '&#x1f4e7;', '&#x1f4e8;', '&#x1f4e9;', '&#x1f4ea;', '&#x1f4eb;', '&#x1f4ec;', '&#x1f4ed;', '&#x1f4ee;', '&#x1f4ef;', '&#x1f4f0;', '&#x1f4f1;', '&#x1f4f2;', '&#x1f4f3;', '&#x1f4f4;', '&#x1f4f5;', '&#x1f4f6;', '&#x1f4f7;', '&#x1f4f8;', '&#x1f4f9;', '&#x1f4fa;', '&#x1f4fb;', '&#x1f4fc;', '&#x1f4fd;', '&#x1f4ff;', '&#x1f500;', '&#x1f501;', '&#x1f502;', '&#x1f503;', '&#x1f504;', '&#x1f505;', '&#x1f506;', '&#x1f507;', '&#x1f508;', '&#x1f509;', '&#x1f50a;', '&#x1f50b;', '&#x1f50c;', '&#x1f50d;', '&#x1f50e;', '&#x1f50f;', '&#x1f510;', '&#x1f511;', '&#x1f512;', '&#x1f513;', '&#x1f514;', '&#x1f515;', '&#x1f516;', '&#x1f517;', '&#x1f518;', '&#x1f519;', '&#x1f51a;', '&#x1f51b;', '&#x1f51c;', '&#x1f51d;', '&#x1f51e;', '&#x1f51f;', '&#x1f520;', '&#x1f521;', '&#x1f522;', '&#x1f523;', '&#x1f524;', '&#x1f525;', '&#x1f526;', '&#x1f528;', '&#x1f529;', '&#x1f52a;', '&#x1f52b;', '&#x1f52d;', '&#x1f52e;', '&#x1f52f;', '&#x1f530;', '&#x1f531;', '&#x1f532;', '&#x1f533;', '&#x1f534;', '&#x1f535;', '&#x1f536;', '&#x1f537;', '&#x1f538;', '&#x1f539;', '&#x1f53a;', '&#x1f53b;', '&#x1f53c;', '&#x1f53d;', '&#x1f549;', '&#x1f54a;', '&#x1f54b;', '&#x1f54c;', '&#x1f54d;', '&#x1f54e;', '&#x1f550;', '&#x1f551;', '&#x1f552;', '&#x1f553;', '&#x1f554;', '&#x1f555;', '&#x1f556;', '&#x1f557;', '&#x1f558;', '&#x1f559;', '&#x1f55a;', '&#x1f55b;', '&#x1f55c;', '&#x1f55d;', '&#x1f55e;', '&#x1f55f;', '&#x1f560;', '&#x1f561;', '&#x1f562;', '&#x1f563;', '&#x1f564;', '&#x1f565;', '&#x1f566;', '&#x1f567;', '&#x1f56f;', '&#x1f570;', '&#x1f573;', '&#x1f574;', '&#x1f575;', '&#x1f576;', '&#x1f577;', '&#x1f578;', '&#x1f579;', '&#x1f57a;', '&#x1f587;', '&#x1f58a;', '&#x1f58b;', '&#x1f58c;', '&#x1f58d;', '&#x1f590;', '&#x1f595;', '&#x1f596;', '&#x1f5a4;', '&#x1f5a5;', '&#x1f5a8;', '&#x1f5b1;', '&#x1f5b2;', '&#x1f5bc;', '&#x1f5c2;', '&#x1f5c3;', '&#x1f5c4;', '&#x1f5d1;', '&#x1f5d2;', '&#x1f5d3;', '&#x1f5dc;', '&#x1f5dd;', '&#x1f5de;', '&#x1f5e1;', '&#x1f5e3;', '&#x1f5ef;', '&#x1f5f3;', '&#x1f5fa;', '&#x1f5fb;', '&#x1f5fc;', '&#x1f5fd;', '&#x1f5fe;', '&#x1f5ff;', '&#x1f600;', '&#x1f601;', '&#x1f602;', '&#x1f603;', '&#x1f604;', '&#x1f605;', '&#x1f606;', '&#x1f607;', '&#x1f608;', '&#x1f609;', '&#x1f60a;', '&#x1f60b;', '&#x1f60c;', '&#x1f60d;', '&#x1f60e;', '&#x1f60f;', '&#x1f610;', '&#x1f611;', '&#x1f612;', '&#x1f613;', '&#x1f614;', '&#x1f615;', '&#x1f616;', '&#x1f617;', '&#x1f618;', '&#x1f619;', '&#x1f61a;', '&#x1f61b;', '&#x1f61c;', '&#x1f61d;', '&#x1f61e;', '&#x1f61f;', '&#x1f620;', '&#x1f621;', '&#x1f622;', '&#x1f623;', '&#x1f624;', '&#x1f625;', '&#x1f626;', '&#x1f627;', '&#x1f628;', '&#x1f629;', '&#x1f62a;', '&#x1f62b;', '&#x1f62c;', '&#x1f62d;', '&#x1f62e;', '&#x1f62f;', '&#x1f630;', '&#x1f631;', '&#x1f632;', '&#x1f633;', '&#x1f634;', '&#x1f635;', '&#x1f636;', '&#x1f637;', '&#x1f638;', '&#x1f639;', '&#x1f63a;', '&#x1f63b;', '&#x1f63c;', '&#x1f63d;', '&#x1f63e;', '&#x1f63f;', '&#x1f640;', '&#x1f641;', '&#x1f642;', '&#x1f643;', '&#x1f644;', '&#x1f645;', '&#x1f646;', '&#x1f647;', '&#x1f648;', '&#x1f649;', '&#x1f64a;', '&#x1f64b;', '&#x1f64c;', '&#x1f64d;', '&#x1f64e;', '&#x1f64f;', '&#x1f681;', '&#x1f682;', '&#x1f683;', '&#x1f684;', '&#x1f685;', '&#x1f686;', '&#x1f687;', '&#x1f688;', '&#x1f689;', '&#x1f68a;', '&#x1f68b;', '&#x1f68c;', '&#x1f68d;', '&#x1f68e;', '&#x1f68f;', '&#x1f690;', '&#x1f691;', '&#x1f693;', '&#x1f694;', '&#x1f695;', '&#x1f696;', '&#x1f697;', '&#x1f698;', '&#x1f699;', '&#x1f69a;', '&#x1f69b;', '&#x1f69c;', '&#x1f69d;', '&#x1f69e;', '&#x1f69f;', '&#x1f6a0;', '&#x1f6a1;', '&#x1f6a2;', '&#x1f6a3;', '&#x1f6a4;', '&#x1f6a5;', '&#x1f6a6;', '&#x1f6a7;', '&#x1f6a8;', '&#x1f6a9;', '&#x1f6aa;', '&#x1f6ab;', '&#x1f6ac;', '&#x1f6ad;', '&#x1f6ae;', '&#x1f6af;', '&#x1f6b0;', '&#x1f6b1;', '&#x1f6b2;', '&#x1f6b3;', '&#x1f6b4;', '&#x1f6b5;', '&#x1f6b6;', '&#x1f6b7;', '&#x1f6b8;', '&#x1f6b9;', '&#x1f6ba;', '&#x1f6bb;', '&#x1f6bc;', '&#x1f6bd;', '&#x1f6be;', '&#x1f6bf;', '&#x1f6c0;', '&#x1f6c1;', '&#x1f6c2;', '&#x1f6c3;', '&#x1f6c4;', '&#x1f6c5;', '&#x1f6cb;', '&#x1f6cc;', '&#x1f6cd;', '&#x1f6ce;', '&#x1f6cf;', '&#x1f6d0;', '&#x1f6d1;', '&#x1f6d2;', '&#x1f6d5;', '&#x1f6e0;', '&#x1f6e1;', '&#x1f6e2;', '&#x1f6e3;', '&#x1f6e4;', '&#x1f6e5;', '&#x1f6e9;', '&#x1f6eb;', '&#x1f6ec;', '&#x1f6f0;', '&#x1f6f3;', '&#x1f6f4;', '&#x1f6f5;', '&#x1f6f6;', '&#x1f6f7;', '&#x1f6f8;', '&#x1f6f9;', '&#x1f6fa;', '&#x1f7e0;', '&#x1f7e1;', '&#x1f7e2;', '&#x1f7e3;', '&#x1f7e4;', '&#x1f7e5;', '&#x1f7e6;', '&#x1f7e7;', '&#x1f7e8;', '&#x1f7e9;', '&#x1f7ea;', '&#x1f7eb;', '&#x1f90d;', '&#x1f90e;', '&#x1f90f;', '&#x1f910;', '&#x1f911;', '&#x1f912;', '&#x1f913;', '&#x1f914;', '&#x1f915;', '&#x1f916;', '&#x1f917;', '&#x1f918;', '&#x1f919;', '&#x1f91a;', '&#x1f91b;', '&#x1f91c;', '&#x1f91e;', '&#x1f91f;', '&#x1f920;', '&#x1f921;', '&#x1f922;', '&#x1f923;', '&#x1f924;', '&#x1f925;', '&#x1f926;', '&#x1f927;', '&#x1f928;', '&#x1f929;', '&#x1f92a;', '&#x1f92b;', '&#x1f92c;', '&#x1f92d;', '&#x1f92e;', '&#x1f92f;', '&#x1f930;', '&#x1f931;', '&#x1f932;', '&#x1f933;', '&#x1f934;', '&#x1f935;', '&#x1f936;', '&#x1f937;', '&#x1f938;', '&#x1f939;', '&#x1f93a;', '&#x1f93c;', '&#x1f93d;', '&#x1f93e;', '&#x1f93f;', '&#x1f940;', '&#x1f941;', '&#x1f942;', '&#x1f943;', '&#x1f944;', '&#x1f945;', '&#x1f947;', '&#x1f948;', '&#x1f949;', '&#x1f94a;', '&#x1f94b;', '&#x1f94c;', '&#x1f94d;', '&#x1f94e;', '&#x1f94f;', '&#x1f950;', '&#x1f951;', '&#x1f952;', '&#x1f953;', '&#x1f954;', '&#x1f955;', '&#x1f956;', '&#x1f957;', '&#x1f958;', '&#x1f959;', '&#x1f95a;', '&#x1f95b;', '&#x1f95c;', '&#x1f95d;', '&#x1f95e;', '&#x1f95f;', '&#x1f960;', '&#x1f961;', '&#x1f962;', '&#x1f963;', '&#x1f964;', '&#x1f965;', '&#x1f966;', '&#x1f967;', '&#x1f968;', '&#x1f969;', '&#x1f96a;', '&#x1f96b;', '&#x1f96c;', '&#x1f96d;', '&#x1f96e;', '&#x1f96f;', '&#x1f970;', '&#x1f971;', '&#x1f973;', '&#x1f974;', '&#x1f975;', '&#x1f976;', '&#x1f97a;', '&#x1f97b;', '&#x1f97c;', '&#x1f97d;', '&#x1f97e;', '&#x1f97f;', '&#x1f980;', '&#x1f981;', '&#x1f982;', '&#x1f983;', '&#x1f984;', '&#x1f985;', '&#x1f986;', '&#x1f987;', '&#x1f988;', '&#x1f989;', '&#x1f98a;', '&#x1f98b;', '&#x1f98c;', '&#x1f98d;', '&#x1f98e;', '&#x1f98f;', '&#x1f990;', '&#x1f991;', '&#x1f992;', '&#x1f993;', '&#x1f994;', '&#x1f995;', '&#x1f996;', '&#x1f997;', '&#x1f998;', '&#x1f999;', '&#x1f99a;', '&#x1f99b;', '&#x1f99c;', '&#x1f99d;', '&#x1f99e;', '&#x1f99f;', '&#x1f9a0;', '&#x1f9a1;', '&#x1f9a2;', '&#x1f9a5;', '&#x1f9a6;', '&#x1f9a7;', '&#x1f9a8;', '&#x1f9a9;', '&#x1f9aa;', '&#x1f9ae;', '&#x1f9b4;', '&#x1f9b5;', '&#x1f9b6;', '&#x1f9b7;', '&#x1f9b8;', '&#x1f9b9;', '&#x1f9bb;', '&#x1f9be;', '&#x1f9bf;', '&#x1f9c0;', '&#x1f9c1;', '&#x1f9c2;', '&#x1f9c3;', '&#x1f9c4;', '&#x1f9c5;', '&#x1f9c6;', '&#x1f9c7;', '&#x1f9c8;', '&#x1f9c9;', '&#x1f9ca;', '&#x1f9cd;', '&#x1f9ce;', '&#x1f9cf;', '&#x1f9d0;', '&#x1f9d1;', '&#x1f9d2;', '&#x1f9d3;', '&#x1f9d4;', '&#x1f9d5;', '&#x1f9d6;', '&#x1f9d7;', '&#x1f9d8;', '&#x1f9d9;', '&#x1f9da;', '&#x1f9db;', '&#x1f9dc;', '&#x1f9dd;', '&#x1f9de;', '&#x1f9df;', '&#x1f9e0;', '&#x1f9e1;', '&#x1f9e2;', '&#x1f9e3;', '&#x1f9e4;', '&#x1f9e5;', '&#x1f9e6;', '&#x1f9e7;', '&#x1f9e8;', '&#x1f9e9;', '&#x1f9ea;', '&#x1f9eb;', '&#x1f9ec;', '&#x1f9ed;', '&#x1f9ee;', '&#x1f9ef;', '&#x1f9f0;', '&#x1f9f1;', '&#x1f9f2;', '&#x1f9f3;', '&#x1f9f4;', '&#x1f9f5;', '&#x1f9f6;', '&#x1f9f7;', '&#x1f9f8;', '&#x1f9f9;', '&#x1f9fa;', '&#x1f9fb;', '&#x1f9fc;', '&#x1f9fd;', '&#x1f9fe;', '&#x1f9ff;', '&#x1fa70;', '&#x1fa71;', '&#x1fa72;', '&#x1fa73;', '&#x1fa78;', '&#x1fa79;', '&#x1fa7a;', '&#x1fa80;', '&#x1fa81;', '&#x1fa82;', '&#x1fa90;', '&#x1fa91;', '&#x1fa92;', '&#x1fa93;', '&#x1fa94;', '&#x1fa95;', '&#x203c;', '&#x2049;', '&#x2122;', '&#x2139;', '&#x2194;', '&#x2195;', '&#x2196;', '&#x2197;', '&#x2198;', '&#x2199;', '&#x21a9;', '&#x21aa;', '&#x20e3;', '&#x231a;', '&#x231b;', '&#x2328;', '&#x23cf;', '&#x23e9;', '&#x23ea;', '&#x23eb;', '&#x23ec;', '&#x23ed;', '&#x23ee;', '&#x23ef;', '&#x23f0;', '&#x23f1;', '&#x23f2;', '&#x23f3;', '&#x23f8;', '&#x23f9;', '&#x23fa;', '&#x24c2;', '&#x25aa;', '&#x25ab;', '&#x25b6;', '&#x25c0;', '&#x25fb;', '&#x25fc;', '&#x25fd;', '&#x25fe;', '&#x2600;', '&#x2601;', '&#x2602;', '&#x2603;', '&#x2604;', '&#x260e;', '&#x2611;', '&#x2614;', '&#x2615;', '&#x2618;', '&#x261d;', '&#x2622;', '&#x2623;', '&#x2626;', '&#x262a;', '&#x262e;', '&#x262f;', '&#x2638;', '&#x2639;', '&#x263a;', '&#x2648;', '&#x2649;', '&#x264a;', '&#x264b;', '&#x264c;', '&#x264d;', '&#x264e;', '&#x264f;', '&#x2650;', '&#x2651;', '&#x2652;', '&#x2653;', '&#x265f;', '&#x2660;', '&#x2663;', '&#x2665;', '&#x2666;', '&#x2668;', '&#x267b;', '&#x267e;', '&#x267f;', '&#x2692;', '&#x2693;', '&#x2694;', '&#x2697;', '&#x2699;', '&#x269b;', '&#x269c;', '&#x26a0;', '&#x26a1;', '&#x26aa;', '&#x26ab;', '&#x26b0;', '&#x26b1;', '&#x26bd;', '&#x26be;', '&#x26c4;', '&#x26c5;', '&#x26c8;', '&#x26ce;', '&#x26cf;', '&#x26d1;', '&#x26d3;', '&#x26d4;', '&#x26e9;', '&#x26ea;', '&#x26f0;', '&#x26f1;', '&#x26f2;', '&#x26f3;', '&#x26f4;', '&#x26f5;', '&#x26f7;', '&#x26f8;', '&#x26f9;', '&#x26fa;', '&#x26fd;', '&#x2702;', '&#x2705;', '&#x2709;', '&#x270a;', '&#x270b;', '&#x270c;', '&#x270d;', '&#x270f;', '&#x2712;', '&#x2714;', '&#x2716;', '&#x271d;', '&#x2721;', '&#x2728;', '&#x2733;', '&#x2734;', '&#x2744;', '&#x2747;', '&#x274c;', '&#x274e;', '&#x2753;', '&#x2754;', '&#x2755;', '&#x2757;', '&#x2763;', '&#x2795;', '&#x2796;', '&#x2797;', '&#x27a1;', '&#x27b0;', '&#x27bf;', '&#x2934;', '&#x2935;', '&#x2b05;', '&#x2b06;', '&#x2b07;', '&#x2b1b;', '&#x2b1c;', '&#x2b50;', '&#x2b55;', '&#x3030;', '&#x303d;', '&#x3297;', '&#x3299;', '&#xe50a;' );
  5346. // END: emoji arrays
  5347. if ( 'entities' === $type ) {
  5348. return $entities;
  5349. }
  5350. return $partials;
  5351. }
  5352. /**
  5353. * Shorten a URL, to be used as link text.
  5354. *
  5355. * @since 1.2.0
  5356. * @since 4.4.0 Moved to wp-includes/formatting.php from wp-admin/includes/misc.php and added $length param.
  5357. *
  5358. * @param string $url URL to shorten.
  5359. * @param int $length Optional. Maximum length of the shortened URL. Default 35 characters.
  5360. * @return string Shortened URL.
  5361. */
  5362. function url_shorten( $url, $length = 35 ) {
  5363. $stripped = str_replace( array( 'https://', 'http://', 'www.' ), '', $url );
  5364. $short_url = untrailingslashit( $stripped );
  5365. if ( strlen( $short_url ) > $length ) {
  5366. $short_url = substr( $short_url, 0, $length - 3 ) . '&hellip;';
  5367. }
  5368. return $short_url;
  5369. }
  5370. /**
  5371. * Sanitizes a hex color.
  5372. *
  5373. * Returns either '', a 3 or 6 digit hex color (with #), or nothing.
  5374. * For sanitizing values without a #, see sanitize_hex_color_no_hash().
  5375. *
  5376. * @since 3.4.0
  5377. *
  5378. * @param string $color
  5379. * @return string|void
  5380. */
  5381. function sanitize_hex_color( $color ) {
  5382. if ( '' === $color ) {
  5383. return '';
  5384. }
  5385. // 3 or 6 hex digits, or the empty string.
  5386. if ( preg_match( '|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) {
  5387. return $color;
  5388. }
  5389. }
  5390. /**
  5391. * Sanitizes a hex color without a hash. Use sanitize_hex_color() when possible.
  5392. *
  5393. * Saving hex colors without a hash puts the burden of adding the hash on the
  5394. * UI, which makes it difficult to use or upgrade to other color types such as
  5395. * rgba, hsl, rgb, and html color names.
  5396. *
  5397. * Returns either '', a 3 or 6 digit hex color (without a #), or null.
  5398. *
  5399. * @since 3.4.0
  5400. *
  5401. * @param string $color
  5402. * @return string|null
  5403. */
  5404. function sanitize_hex_color_no_hash( $color ) {
  5405. $color = ltrim( $color, '#' );
  5406. if ( '' === $color ) {
  5407. return '';
  5408. }
  5409. return sanitize_hex_color( '#' . $color ) ? $color : null;
  5410. }
  5411. /**
  5412. * Ensures that any hex color is properly hashed.
  5413. * Otherwise, returns value untouched.
  5414. *
  5415. * This method should only be necessary if using sanitize_hex_color_no_hash().
  5416. *
  5417. * @since 3.4.0
  5418. *
  5419. * @param string $color
  5420. * @return string
  5421. */
  5422. function maybe_hash_hex_color( $color ) {
  5423. $unhashed = sanitize_hex_color_no_hash( $color );
  5424. if ( $unhashed ) {
  5425. return '#' . $unhashed;
  5426. }
  5427. return $color;
  5428. }