convert certain special characters to ascii in php - ascii

I need a php script that convert certain special characters to ascii code( , . / - and all the letter with accent)
eg.
original:
Dingo a accidentellement fait tomber la pièce porte-bonheur de Mickey tout au fond du lac. Le Professeur Von Drake va utiliser son camping-car et le transformer en sous-marin pour explorer les eaux profondes.
result:
Dingo a accidentellement fait tomber la pièce porte-bonheur de Mickey tout au fond du lac. Le Professeur Von Drake va utiliser son camping-car et le transformer en sous-marin pour explorer les eaux profondes.
I've tried htmlspecialchars() doesn't seems work out it only convert the characters which are special significance in HTML

If you look at the documentation of htmlspecialchars() you will see:
If you require all input substrings that have associated named entities to be translated, use htmlentities() instead.

Related

sphinx gettext inserts empty quotes "" in front of previously matching msg

Currently my worflow when I change things in the original file is this:
make gettext to update *.pot files
sphinx-intl update -p build/gettext -l fr to create *.po files out of it
However, this always results in the following behavior: Some longer messages in the *.po files are not correctly updated or to be more correct they are updated although they didn't change. sphinx-intl update will insert quotes "" in front of every paragraph that spans over multiple lines. Here's how that looks:
Before: (in some french *.po file):
msgid "Some longer paragraph text that spans multiple lines. This text was just"
"lying here and matched a sequence within the file before gettext inserted"
"unnecessary quotes on top."
msgstr "Un texte de paragraphe plus long qui s'étend sur plusieurs lignes. Ce texte se trouvait juste ici et correspondait à une séquence dans le fichier avant que gettext n'insère des guillemets inutiles par-dessus."
After:
msgid ""
"Some longer paragraph text that spans multiple lines. This text was just"
"lying here and matched a sequence within the file before gettext inserted"
"unnecessary quotes on top."
msgstr ""
"Un texte de paragraphe plus long qui s'étend sur plusieurs lignes "
"Ce texte se trouvait juste ici et correspondait à une séquence dans le "
"fichier avant que gettext n'insère des guillemets inutiles par-dessus."
This is extremely annoying as it will not match anymore with the text it is supposed to! Only when I remove the leading "" the texts will match again. I wondered if this happens because I tend write my translated msgstr as one line without intermitted quotes (what are they good for anyway?). After sphinx-intl update they are enclosed in quotes...
What is going on and how can I prevent this?

HMTLUnit how to get IMG url in javascript?

For HTMLunit prof here, can you tell if it's possible to get each url present in a javascript code.
For example, in this code, i'd like to get each ".jpg" url :
I mean, alle images in "photos" variable.
Thank you for your help
<script ngappstate>var ngAppState = {"advertising":{"triggerImbvpjs":false},"authentication":{"isBusy":false},"property":{"estate":{"id":8345497,"publisherId":785672,"pubDate":"2019-09-17T10:08:13.000+02:00","photos":["https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_1.jpg?cache=2019091009047","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_2.jpg?cache=2019091009097","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_3.jpg?cache=2019091009330","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_4.jpg?cache=2019091009330","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_5.jpg?cache=2019091009657","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_6.jpg?cache=2019091009737","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_7.jpg?cache=2019091009843","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_8.jpg?cache=2019091009953","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_9.jpg?cache=2019091009017","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_A.jpg?cache=2019091009093","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_B.jpg?cache=2019091009233","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_C.jpg?cache=2019091009453","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_D.jpg?cache=2019091009467","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_E.jpg?cache=2019091009467","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_F.jpg?cache=2019091009560","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_G.jpg?cache=2019091009467","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_H.jpg?cache=2019091009717","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_I.jpg?cache=2019091009717","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_J.jpg?cache=2019091009717","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_K.jpg?cache=2019091009873","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_L.jpg?cache=2019091009907"],"picturesResized":[{"lastModificationDate":"2019-09-17T10:09:19.080+02:00","ordering":1,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_1.jpg?cache=2019091009047","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_1.jpg?cache=2019091009080","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_1.gif?cache=2019091009080","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.110+02:00","ordering":2,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_2.jpg?cache=2019091009097","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_2.jpg?cache=2019091009110","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_2.gif?cache=2019091009110","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.330+02:00","ordering":3,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_3.jpg?cache=2019091009330","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_3.jpg?cache=2019091009330","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_3.gif?cache=2019091009347","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.347+02:00","ordering":4,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_4.jpg?cache=2019091009330","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_4.jpg?cache=2019091009347","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_4.gif?cache=2019091009423","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.673+02:00","ordering":5,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_5.jpg?cache=2019091009657","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_5.jpg?cache=2019091009673","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_5.gif?cache=2019091009673","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.737+02:00","ordering":6,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_6.jpg?cache=2019091009737","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_6.jpg?cache=2019091009737","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_6.gif?cache=2019091009750","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.843+02:00","ordering":7,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_7.jpg?cache=2019091009843","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_7.jpg?cache=2019091009843","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_7.gif?cache=2019091009860","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.970+02:00","ordering":8,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_8.jpg?cache=2019091009953","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_8.jpg?cache=2019091009970","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_8.gif?cache=2019091009983","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.030+02:00","ordering":9,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_9.jpg?cache=2019091009017","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_9.jpg?cache=2019091009030","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_9.gif?cache=2019091009047","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.110+02:00","ordering":11,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_A.jpg?cache=2019091009093","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_A.jpg?cache=2019091009110","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_A.gif?cache=2019091009110","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.250+02:00","ordering":12,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_B.jpg?cache=2019091009233","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_B.jpg?cache=2019091009250","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_B.gif?cache=2019091009453","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.467+02:00","ordering":13,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_C.jpg?cache=2019091009453","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_C.jpg?cache=2019091009467","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_C.gif?cache=2019091009547","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.467+02:00","ordering":14,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_D.jpg?cache=2019091009467","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_D.jpg?cache=2019091009467","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_D.gif?cache=2019091009657","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.467+02:00","ordering":15,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_E.jpg?cache=2019091009467","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_E.jpg?cache=2019091009467","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_E.gif?cache=2019091009717","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.467+02:00","ordering":16,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_F.jpg?cache=2019091009560","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_F.jpg?cache=2019091009467","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_F.gif?cache=2019091009717","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.467+02:00","ordering":17,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_G.jpg?cache=2019091009467","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_G.jpg?cache=2019091009467","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_G.gif?cache=2019091009717","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.873+02:00","ordering":18,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_H.jpg?cache=2019091009717","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_H.jpg?cache=2019091009873","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_H.gif?cache=2019091009907","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.873+02:00","ordering":19,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_I.jpg?cache=2019091009717","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_I.jpg?cache=2019091009873","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_I.gif?cache=2019091009907","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.873+02:00","ordering":20,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_J.jpg?cache=2019091009717","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_J.jpg?cache=2019091009873","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_J.gif?cache=2019091009907","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.907+02:00","ordering":21,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_K.jpg?cache=2019091009873","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_K.jpg?cache=2019091009907","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_K.gif?cache=2019091009907","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.907+02:00","ordering":22,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_L.jpg?cache=2019091009907","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_L.jpg?cache=2019091009907","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_L.gif?cache=2019091009920","pictureOrientation":"LANDSCAPE"}],"flags":{"new":true,"defaultOrderingScore":1,"priceOrderingScore":279000,"dateOrderingScore":"2019-09-17T10:08:13.657+02:00","pricem2orderScore":0,"adQualityScore":90.87},"adType":"M","energy":{"energyConsumption":495,"yearlyTheoreticalTotalEnergyConsumption":109187,"EPCScore":"F","CO2emission":null,"EPCreferenceNumber":"20190811002958","Heating":"Gas","doubleGlazing":true,"epcreferenceNumber":"20190811002958"},"media":[{"type":"VIRTUAL_TOUR","content":{"value":"https://my.matterport.com/show/?m=jXVimgXaXwY&lang=fr&help=2&lp=1&hl=0&ts=1&st=5000&guides=0&qs=1' f"}}],"mainType":"HOUSE","subtype":"HOUSE","geographical":{"geo":{"latitude":50.4037765,"longitude":4.395336},"geoPoint":{"latitude":50.4037765,"longitude":4.395336},"hasSeaView":false,"postal":{"country":"BE","province":"Hainaut","district":"Charleroi","locality":"Montigny-le-Tilleul","postalcode":"6110","street":"Rue de Cartier","number":"56","box":"","buildingName":"","region":"WALLONIE"},"postalAddr":{"country":"BE","province":"Hainaut","district":"Charleroi","locality":"Montigny-le-Tilleul","postalcode":"6110","street":"Rue de Cartier","number":"56","box":"","buildingName":"","region":"WALLONIE"}},"buyRent":"BUY","transactionSubtype":"BUY_REGULAR","activationStatus":"CODE_STATUS_ACTIVATED","description":{"title":"Magnifique maison de maitre 4 façades entièrement rénovée, 4","description":"!!!Rue de Cartier 56 Commune de Marchienne - au - Pont!!! https://www.youtube.com/watch?v=k_pd8XSxgoE ou n'hésitez pas à cliquer sur l'onglet MEDIA (sur la première photo) pour une visite virtuelle interactive. VISITES ET RENSEIGNEMENTS AU 0487 34 34 83 - Magnifique maison de maitre 4 façades entièrement rénovée, 4 chambres avec jardin. Comprenant caves, hall d'entrée, living, cuisine, bureau, salle de bains avec wc, double vasques, baignoire, douche italienne. 1°: hall de nuit, deux chambres. Au 2°: hall de nuit, deux chambres. Chauffage central au gaz, châssis TV PVC, plancher béton à tous les niveaux, cuisine Ducati prix d'achat 56.000€, alarme, adoucisseur d'eau. FAIRE OFFRE A PARTIR DE 279.000€. DESCRIPTIF COMPLET SUR LE","moreInfo":"WWW.LOPPORTUNITE.BE A TITRE INFORMATIF ET NON CONTRACTUEL."},"general":{"netFloorArea":220,"frontageNumber":4,"buildingCondition":"JUST_RENOVATED","availability":""},"interior":{"bedrooms":4,"bathroomNumber":1,"toiletsNumber":1,"kitchenSetup":"Installed","cellarProperty":true},"buildingRegulation":{"planningPermissionObtained":"NOT_SPECIFIED","asBuiltPlan":"NO","subdivisionPermit":"NOT_SPECIFIED","possiblePriorityPurchaseRight":"NOT_SPECIFIED","proceedingsForBreachOfPlanningRegulations":"NOT_SPECIFIED","floodZoneInfo":null},"financial":{"vatProfile":"VAT_INCLUDED","salePrice":279000,"cadastralIncome":803,"priceBasedOn":false,"isMinimumBid":false,"isPriceBased":false},"soldInfo":{"sold":false,"soldLabel":"NO_LABEL"},"contactInfo":{"phone":"+3271799549","email":"lopportunite#omniwebsites.be","mobile":"","idclient":785672,"clientType":"AGE","title":"L' OPPORTUNITE","location":{"geo":{"latitude":50.4115438,"longitude":4.381455},"geoPoint":{"latitude":50.4115438,"longitude":4.381455},"postal":{"country":"BE","province":"Hainaut","district":"Charleroi","locality":"Monceau-sur-sambre","postalcode":"6031","street":"Rue des Combattants 37","number":"","box":"","region":"WALLONIE"},"postalAddr":{"country":"BE","province":"Hainaut","district":"Charleroi","locality":"Monceau-sur-sambre","postalcode":"6031","street":"Rue des Combattants 37","number":"","box":"","region":"WALLONIE"}},"logo":"https://static.immoweb.be/logos/785672.gif?cache=2017061204440","www":"http://www.lopportunite.be","ipiNo":"503906","referenceWithinSoftware":"2655","referenceWithinAgency":"2655 - 868","responsible":""},"land":{"surfaceAreaOfPlot":230}},"publishers":[{"id":785672,"ipiNo":"503906","geoPoint":{"latitude":50.4115438,"longitude":4.381455},"name":"L' OPPORTUNITE","logoUri":"https://static.immoweb.be/logos/785672.gif?cache=2017061204440","email":"lopportunite#omniwebsites.be","phones":["+3271799549"],"address":"Rue des Combattants 37","zip":6031,"locality":"Monceau-sur-sambre","description":{"text":"Nous vendons rapidement votre maison, appartement, immeuble de rapport, terrain,… et ce au meilleur prix.\r\n\r\n- ESTIMATION DE VOTRE BIEN\r\n- SERVICE PERSONNALISE A NOTRE CLIENTELE\r\n- MISSION DE VENTE CLAIRE ET PRECISE\r\n- PUBLICITE CIBLEE, VISITES ORGANISEES","language":"fr"},"timetable":{},"contactHours":"MT","contactHoursGsm":"MT","emails":[{"contactInformation":"lopportunite#omniwebsites.be","usage":"DEFAULT"}],"landLines":[{"contactInformation":"+3271799549","usage":"DEFAULT"}],"faxMachines":[{"contactInformation":"+3271315405","usage":"DEFAULT"}],"country":"be"}],"media":null,"status":1}};</script>
You wouldnt do something like that with htmlunit. Instead use Regular Expressions to search for those links. You can use this regular expression for the task: (http([a-zA-Z\/:\.0-9_]*)?.jpg). The example looks like this:
var reg= /(http([a-zA-Z\/:\.0-9_]*)?.jpg)/g;
var ngAppState = {"advertising":{"triggerImbvpjs":false},"authentication":{"isBusy":false},"property":{"estate":{"id":8345497,"publisherId":785672,"pubDate":"2019-09-17T10:08:13.000+02:00","photos":["https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_1.jpg?cache=2019091009047","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_2.jpg?cache=2019091009097","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_3.jpg?cache=2019091009330","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_4.jpg?cache=2019091009330","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_5.jpg?cache=2019091009657","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_6.jpg?cache=2019091009737","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_7.jpg?cache=2019091009843","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_8.jpg?cache=2019091009953","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_9.jpg?cache=2019091009017","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_A.jpg?cache=2019091009093","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_B.jpg?cache=2019091009233","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_C.jpg?cache=2019091009453","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_D.jpg?cache=2019091009467","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_E.jpg?cache=2019091009467","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_F.jpg?cache=2019091009560","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_G.jpg?cache=2019091009467","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_H.jpg?cache=2019091009717","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_I.jpg?cache=2019091009717","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_J.jpg?cache=2019091009717","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_K.jpg?cache=2019091009873","https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_L.jpg?cache=2019091009907"],"picturesResized":[{"lastModificationDate":"2019-09-17T10:09:19.080+02:00","ordering":1,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_1.jpg?cache=2019091009047","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_1.jpg?cache=2019091009080","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_1.gif?cache=2019091009080","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.110+02:00","ordering":2,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_2.jpg?cache=2019091009097","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_2.jpg?cache=2019091009110","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_2.gif?cache=2019091009110","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.330+02:00","ordering":3,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_3.jpg?cache=2019091009330","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_3.jpg?cache=2019091009330","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_3.gif?cache=2019091009347","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.347+02:00","ordering":4,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_4.jpg?cache=2019091009330","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_4.jpg?cache=2019091009347","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_4.gif?cache=2019091009423","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.673+02:00","ordering":5,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_5.jpg?cache=2019091009657","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_5.jpg?cache=2019091009673","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_5.gif?cache=2019091009673","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.737+02:00","ordering":6,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_6.jpg?cache=2019091009737","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_6.jpg?cache=2019091009737","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_6.gif?cache=2019091009750","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.843+02:00","ordering":7,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_7.jpg?cache=2019091009843","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_7.jpg?cache=2019091009843","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_7.gif?cache=2019091009860","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:19.970+02:00","ordering":8,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_8.jpg?cache=2019091009953","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_8.jpg?cache=2019091009970","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_8.gif?cache=2019091009983","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.030+02:00","ordering":9,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_9.jpg?cache=2019091009017","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_9.jpg?cache=2019091009030","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_9.gif?cache=2019091009047","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.110+02:00","ordering":11,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_A.jpg?cache=2019091009093","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_A.jpg?cache=2019091009110","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_A.gif?cache=2019091009110","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.250+02:00","ordering":12,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_B.jpg?cache=2019091009233","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_B.jpg?cache=2019091009250","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_B.gif?cache=2019091009453","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.467+02:00","ordering":13,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_C.jpg?cache=2019091009453","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_C.jpg?cache=2019091009467","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_C.gif?cache=2019091009547","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.467+02:00","ordering":14,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_D.jpg?cache=2019091009467","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_D.jpg?cache=2019091009467","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_D.gif?cache=2019091009657","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.467+02:00","ordering":15,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_E.jpg?cache=2019091009467","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_E.jpg?cache=2019091009467","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_E.gif?cache=2019091009717","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.467+02:00","ordering":16,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_F.jpg?cache=2019091009560","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_F.jpg?cache=2019091009467","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_F.gif?cache=2019091009717","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.467+02:00","ordering":17,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_G.jpg?cache=2019091009467","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_G.jpg?cache=2019091009467","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_G.gif?cache=2019091009717","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.873+02:00","ordering":18,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_H.jpg?cache=2019091009717","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_H.jpg?cache=2019091009873","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_H.gif?cache=2019091009907","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.873+02:00","ordering":19,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_I.jpg?cache=2019091009717","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_I.jpg?cache=2019091009873","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_I.gif?cache=2019091009907","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.873+02:00","ordering":20,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_J.jpg?cache=2019091009717","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_J.jpg?cache=2019091009873","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_J.gif?cache=2019091009907","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.907+02:00","ordering":21,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_K.jpg?cache=2019091009873","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_K.jpg?cache=2019091009907","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_K.gif?cache=2019091009907","pictureOrientation":"LANDSCAPE"},{"lastModificationDate":"2019-09-17T10:09:20.907+02:00","ordering":22,"pictureFormatLarge":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_L.jpg?cache=2019091009907","pictureFormatMedium":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/M_8345497_L.jpg?cache=2019091009907","pictureFormatSmall":"https://static.immoweb.be/photos/0/8/3/4/5/4/9/7/8345497_L.gif?cache=2019091009920","pictureOrientation":"LANDSCAPE"}],"flags":{"new":true,"defaultOrderingScore":1,"priceOrderingScore":279000,"dateOrderingScore":"2019-09-17T10:08:13.657+02:00","pricem2orderScore":0,"adQualityScore":90.87},"adType":"M","energy":{"energyConsumption":495,"yearlyTheoreticalTotalEnergyConsumption":109187,"EPCScore":"F","CO2emission":null,"EPCreferenceNumber":"20190811002958","Heating":"Gas","doubleGlazing":true,"epcreferenceNumber":"20190811002958"},"media":[{"type":"VIRTUAL_TOUR","content":{"value":"https://my.matterport.com/show/?m=jXVimgXaXwY&lang=fr&help=2&lp=1&hl=0&ts=1&st=5000&guides=0&qs=1' f"}}],"mainType":"HOUSE","subtype":"HOUSE","geographical":{"geo":{"latitude":50.4037765,"longitude":4.395336},"geoPoint":{"latitude":50.4037765,"longitude":4.395336},"hasSeaView":false,"postal":{"country":"BE","province":"Hainaut","district":"Charleroi","locality":"Montigny-le-Tilleul","postalcode":"6110","street":"Rue de Cartier","number":"56","box":"","buildingName":"","region":"WALLONIE"},"postalAddr":{"country":"BE","province":"Hainaut","district":"Charleroi","locality":"Montigny-le-Tilleul","postalcode":"6110","street":"Rue de Cartier","number":"56","box":"","buildingName":"","region":"WALLONIE"}},"buyRent":"BUY","transactionSubtype":"BUY_REGULAR","activationStatus":"CODE_STATUS_ACTIVATED","description":{"title":"Magnifique maison de maitre 4 façades entièrement rénovée, 4","description":"!!!Rue de Cartier 56 Commune de Marchienne - au - Pont!!! https://www.youtube.com/watch?v=k_pd8XSxgoE ou n'hésitez pas à cliquer sur l'onglet MEDIA (sur la première photo) pour une visite virtuelle interactive. VISITES ET RENSEIGNEMENTS AU 0487 34 34 83 - Magnifique maison de maitre 4 façades entièrement rénovée, 4 chambres avec jardin. Comprenant caves, hall d'entrée, living, cuisine, bureau, salle de bains avec wc, double vasques, baignoire, douche italienne. 1°: hall de nuit, deux chambres. Au 2°: hall de nuit, deux chambres. Chauffage central au gaz, châssis TV PVC, plancher béton à tous les niveaux, cuisine Ducati prix d'achat 56.000€, alarme, adoucisseur d'eau. FAIRE OFFRE A PARTIR DE 279.000€. DESCRIPTIF COMPLET SUR LE","moreInfo":"WWW.LOPPORTUNITE.BE A TITRE INFORMATIF ET NON CONTRACTUEL."},"general":{"netFloorArea":220,"frontageNumber":4,"buildingCondition":"JUST_RENOVATED","availability":""},"interior":{"bedrooms":4,"bathroomNumber":1,"toiletsNumber":1,"kitchenSetup":"Installed","cellarProperty":true},"buildingRegulation":{"planningPermissionObtained":"NOT_SPECIFIED","asBuiltPlan":"NO","subdivisionPermit":"NOT_SPECIFIED","possiblePriorityPurchaseRight":"NOT_SPECIFIED","proceedingsForBreachOfPlanningRegulations":"NOT_SPECIFIED","floodZoneInfo":null},"financial":{"vatProfile":"VAT_INCLUDED","salePrice":279000,"cadastralIncome":803,"priceBasedOn":false,"isMinimumBid":false,"isPriceBased":false},"soldInfo":{"sold":false,"soldLabel":"NO_LABEL"},"contactInfo":{"phone":"+3271799549","email":"lopportunite#omniwebsites.be","mobile":"","idclient":785672,"clientType":"AGE","title":"L' OPPORTUNITE","location":{"geo":{"latitude":50.4115438,"longitude":4.381455},"geoPoint":{"latitude":50.4115438,"longitude":4.381455},"postal":{"country":"BE","province":"Hainaut","district":"Charleroi","locality":"Monceau-sur-sambre","postalcode":"6031","street":"Rue des Combattants 37","number":"","box":"","region":"WALLONIE"},"postalAddr":{"country":"BE","province":"Hainaut","district":"Charleroi","locality":"Monceau-sur-sambre","postalcode":"6031","street":"Rue des Combattants 37","number":"","box":"","region":"WALLONIE"}},"logo":"https://static.immoweb.be/logos/785672.gif?cache=2017061204440","www":"http://www.lopportunite.be","ipiNo":"503906","referenceWithinSoftware":"2655","referenceWithinAgency":"2655 - 868","responsible":""},"land":{"surfaceAreaOfPlot":230}},"publishers":[{"id":785672,"ipiNo":"503906","geoPoint":{"latitude":50.4115438,"longitude":4.381455},"name":"L' OPPORTUNITE","logoUri":"https://static.immoweb.be/logos/785672.gif?cache=2017061204440","email":"lopportunite#omniwebsites.be","phones":["+3271799549"],"address":"Rue des Combattants 37","zip":6031,"locality":"Monceau-sur-sambre","description":{"text":"Nous vendons rapidement votre maison, appartement, immeuble de rapport, terrain,… et ce au meilleur prix.\r\n\r\n- ESTIMATION DE VOTRE BIEN\r\n- SERVICE PERSONNALISE A NOTRE CLIENTELE\r\n- MISSION DE VENTE CLAIRE ET PRECISE\r\n- PUBLICITE CIBLEE, VISITES ORGANISEES","language":"fr"},"timetable":{},"contactHours":"MT","contactHoursGsm":"MT","emails":[{"contactInformation":"lopportunite#omniwebsites.be","usage":"DEFAULT"}],"landLines":[{"contactInformation":"+3271799549","usage":"DEFAULT"}],"faxMachines":[{"contactInformation":"+3271315405","usage":"DEFAULT"}],"country":"be"}],"media":null,"status":1}};
var text = JSON.stringify(ngAppState);
while((result = reg.exec(text)) !== null) {
console.log(result[0]);
}

Explanation of error using "color" in a batch script

In order to set the color of a batch script's console/terminal, color can be used. E.g. color 70. However, in order to reset the color of a the console, color without any arguments/values can be used. What is causing confusion for me is why it only works inside the command prompt or a called script but not a script started specifically with cmd /c. It fails and returns an errorcode of 1. Is there some legacy reason for this or is it a bug in Windows?
cmd /c color || echo foobar
Output: foobar
Expected output:
cmd /c color 70 || echo foobar
Output:
Expected output:
call color || echo foobar
Output:
Expected output:
To have no error, try to put the default color, as you said,
the color of a the console
That means the default color, I gess, so put color 07, to switch to color black-light grey.
For more info for colors in a .bat file create a .bat file and put in it color h, only this, save it and run it. It will give you all the info about colors.
If you are not able to do this, here is what it will show you. (Sorry, it's in french, but I gess you can understand)
Change les couleurs par défaut du premier et de l'arrière plan de la console.
COLOR [attr]
attr Spécifie les attributs de couleurs de l'apparence de la console
Les attributs de couleurs sont spécifiés par DEUX chiffres hexadécimaux -- le
premier correspond à l'arrière plan, le second au premier plan. Chaque chiffre
peut prendre n'importe quelle de ces valeurs :
0 = Noir 8 = Gris
1 = Bleu foncé 9 = Bleu clair
2 = Vert A = Vert clair
3 = Bleu-gris B = Cyan
4 = Marron C = Rouge
5 = Pourpre D = Rose
6 = Kaki E = Jaune
7 = Gris clair F = Blanc
Si aucun argument n'est donné, cette commande restaure les couleurs
sélectionnées au moment où CMD.EXE a été ouvert. Cette valeur vient soit de la
fenêtre de la console, du commutateur en ligne de commande /T, ou de la valeur
DefaultColor du registre.
Appuyez sur une touche pour continuer...
Again, sorry that is in french
Kalolol

termvector counting keywords in Elasticsearch

I am using elasticsearch 1.5.2.
I want to get the number of time that every keyword is repeated on a stored products in my index.
keywords are : sauces, crèmes, gâteaux.
these are my products:
POST test/prod
{
"titre": "product 1",
"catégorie": "Epicerie",
"informations": "Sauces, potages, crèmes & gâteaux. / Composé exclusivement d'amidon de maïs, il vous permet d'alléger vos gâteaux et crêpes ou bien d'épaissir vos sauces, soupes et crèmes. Il rend vos desserts onctueux et légers : il suffit simplement de remplacer la moitié de votre farine par la fécule de maïs. // Poids net : 0,400 kg // Veuillez contacter notre responsable de mise en marché : Distribué par Système U - BP 30159 - 94533 Rungis cedex"
}
POST test/prod
{
"titre": "product 2",
"catégorie": "Fruits",
"informations": "A conserver dans un endoit frais et sec. Idée recette: Madeleines fourrées au chocolat Ingrédients (pour une vingtaine de madeleines) : 100g de farine, 90g fécule de maïs,1 sachet de levure, 3 oeufs,125g de sucre,190g de beurre,1cuillère à soupe d'eau de fleur d'oranger, 1 vingtaine de carrés de chocolat Préparation : Mélangez la farine, la fécule et la levure. Ajoutez le sucre et les oeufs battus. Faites fondre le beurre à feu doux et incorporer le au précédent mélange. Mélangez bien et laissez reposer la pâte une heure au réfrigérateur. Préchauffez le four à 220°C. Beurrez les moules à madeleine, garnissez les moules de moitié, ajoutez au centre un petit carré de chocolat et recouvrez de l'appareil à madeleine. Enfournez pour 5 minutes puis baissez le four à 180°C et poursuivez la cuisson 5 minutes. Sortez les madeleines, laissez-les tiédir et démoulez-les."
}
I want to get a result in order desc like this for example:
product 1:
sauces repeated :9
crèmes repeated :8
gâteaux repeated: 2
product 2:
sauces repeated :8
crèmes repeated :6
gâteaux repeated: 4
I used termvector in only one field, however I want to get the result from all document. It was like this:
POST test/prod/1/_termvector
{
"fields" : ["informations"],
"offsets" : true,
"payloads" : true,
"positions" : true,
"term_statistics" : true,
"field_statistics" : true
}
But I get as a result a very long list which contains all words in this field. I want only as a result my 3 keywords.

Justify + TabSpaces does not work on CKEDITOR

team!
When I use "config.tabSpaces = 20;" in justified text, he gets different spaces. for example:
first paragraph:
<p style="text-align:justify"> Além disso, constata-se que a parte reclamante recebeu, como última remuneração, valor <strong><u>muito acima do piso dos bancários, diferenciando-o de um SIMPLES CAIXA, quer seja pelas atividades desenvolvida, quer seja pela maior remuneração auferida.</u></strong></p>
second paragraph:
<p style="text-align:justify"> Nesse passo, verifica-se que era depositada uma confiança acima do comum, além daquela que é inerente a qualquer relação de emprego, <strong>e muito diferenciada das responsabilidades daqueles que exercem cargos de base (caixas, agentes ou atendentes comerciais)</strong>, estes sim, bancários comuns.</p>
see that tab spaces were different, microsoft word redistributes spaces as the length of the sentence
someone can help me?
CKEditor is not Microsoft Word. CKEditor is focused on editing fragments of HTML documents from the semantical (structural) POV, not from the visual POV. You cannot expect it to work as Microsoft Word which, despite the seeming similarities, is a totally different tool.
So the behaviour you encountered is the right behaviour, because it is caused by how HTML and CSS works.

Resources