Event JSON
{
"id": "e124781cefc17b41ff7565d2d866b95e11acaa5160ce9c804f1de521f8028b10",
"pubkey": "facdaf1ce758bdf04cdf1a1fa32a3564a608d4abc2481a286ffc178f86953ef0",
"created_at": 1684095034,
"kind": 1,
"tags": [
[
"e",
"729ae5e471d87abad1489cb98d6cc98c9e85c6adfbd0f819f17d8d1275804668",
"",
"root"
],
[
"e",
"ebe0ac88694b420ca4a1a67a174a3e4a18dd3aa040802dea94ac34223044b3e1",
"",
"reply"
],
[
"p",
"2779f3d9f42c7dee17f0e6bcdcf89a8f9d592d19e3b1bbd27ef1cffd1a7f98d1"
],
[
"p",
"17c18fce2db435a93f25d90385bd37159a199affc7b4e92c06d2a0372fda85bd"
],
[
"p",
"3356de61b39647931ce8b2140b2bab837e0810c0ef515bbe92de0248040b8bdd"
],
[
"p",
"de688dac753fb178fc3b1fe617661f9d2bbad7998533364c3f9b77051ba1ad8c"
],
[
"p",
"1577e4599dd10c863498fe3c20bd82aafaf829a595ce83c5cf8ac3463531b09b"
],
[
"p",
"7f5c2b4e48a0e9feca63a46b13cdb82489f4020398d60a2070a968caa818d75d"
],
[
"p",
"c094ccc6b3b3f969bc37a900a01a3c69c692532fedab909aaa6cce8bf5f06a03"
],
[
"p",
"17538dc2a62769d09443f18c37cbe358fab5bbf981173542aa7c5ff171ed77c4"
],
[
"p",
"2779f3d9f42c7dee17f0e6bcdcf89a8f9d592d19e3b1bbd27ef1cffd1a7f98d1"
],
[
"t",
"\\"
]
],
"content": "Hey nostr:npub1yaul8k059377u9lsu67de7y637w4jtgeuwcmh5n7788l6xnlnrgs3tvjmf \n\nThe following solution may possibly work. I am not an expert in iOS app development (in fact never done it). So, please take what I say with a pinch of salt :D\n\nThe call flow in damus goes like this from my preliminary analysis of the code on Github 👇\n\n```\ndamus.c :: parse_hashtags ==\u003e \n cursor.h :: consume_until_boundary ==\u003e \n cursor.h :: is_boundary\n\n```\n\nI believe the fix is to change how the `is_boundary` function is implemented in damus.\n\nWhen we look at the implementation of hashtags from the other clients, the regular expression based matching does not have any check for alphanumerics, but instead just a set of 'prohibited characters' (a black list)\n\nAmethyst regex is this:\n\n```java\n\"#([^\\\\s!@#\\$%^\u0026*()=+./,\\\\[{\\\\]};:'\\\"?\u003e\u003c]+)(.*)\"\n```\n\nSnort regex is this:\n\n```js\n/(#[^\\s!@#$%^\u0026*()=+.\\/,\\[{\\]};:'\"?\u003e\u003c]+)/\n```\n\nBoth of these regexes try to just write a blacklist of chars that can't be there in a hashtag, instead of whitelisting alphanumerics.\n\nIf, in c code, we can come up with a function that will check for blacklisted characters and return a boolean, we could use this to implement international hashtags in damus too.\n\nNot sure if my theory is correct.",
"sig": "be9f88dee7a8ec3481dcb8b4eb989de9f48a29b640ac646ffb8faa517f1277ea494f26c6d688cdd63b2323c7ea3cbae435273a4717806033bd480d387c50cd16"
}